fix realtime timestamp to int

This commit is contained in:
Torsten Dittmann
2021-09-06 11:36:36 +02:00
parent 8597e87633
commit 3da54fc2ef
6 changed files with 11 additions and 8 deletions
+3
View File
@@ -1,3 +1,6 @@
## 1.0.2
- Fix timestamp in Realtime Response to Integer
## 1.0.1
- Fix null pointer exception while creating OAuth2 session
- Export RealtimeMessage
+1 -1
View File
@@ -21,7 +21,7 @@ Add this to your package's `pubspec.yaml` file:
```yml
dependencies:
appwrite: ^1.0.1
appwrite: ^1.0.2
```
You can install packages from the command line:
+1 -1
View File
@@ -33,7 +33,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
.replaceFirst('http://', 'ws://');
_headers = {
'content-type': 'application/json',
'x-sdk-version': 'appwrite:flutter:1.0.1',
'x-sdk-version': 'appwrite:flutter:1.0.2',
'X-Appwrite-Response-Format' : '0.10.0',
};
+1 -1
View File
@@ -52,7 +52,7 @@ class ClientIO extends ClientBase with ClientMixin {
.replaceFirst('http://', 'ws://');
this._headers = {
'content-type': 'application/json',
'x-sdk-version': 'appwrite:flutter:1.0.1',
'x-sdk-version': 'appwrite:flutter:1.0.2',
'X-Appwrite-Response-Format' : '0.10.0',
};
+4 -4
View File
@@ -5,7 +5,7 @@ class RealtimeMessage {
final String event;
final Map<String, dynamic> payload;
final List<String> channels;
final DateTime timestamp;
final int timestamp;
RealtimeMessage({
required this.event,
required this.payload,
@@ -17,7 +17,7 @@ class RealtimeMessage {
String? event,
Map<String, dynamic>? payload,
List<String>? channels,
DateTime? timestamp,
int? timestamp,
}) {
return RealtimeMessage(
event: event ?? this.event,
@@ -32,7 +32,7 @@ class RealtimeMessage {
'event': event,
'payload': payload,
'channels': channels,
'timestamp': timestamp.millisecondsSinceEpoch,
'timestamp': timestamp,
};
}
@@ -41,7 +41,7 @@ class RealtimeMessage {
event: map['event'],
payload: Map<String, dynamic>.from(map['payload'] ?? <String, dynamic>{}),
channels: List<String>.from(map['channels'] ?? []),
timestamp: DateTime.fromMillisecondsSinceEpoch(map['timestamp']),
timestamp: map['timestamp'],
);
}
+1 -1
View File
@@ -1,5 +1,5 @@
name: appwrite
version: 1.0.1
version: 1.0.2
description: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API
homepage: https://appwrite.io
repository: https://github.com/appwrite/sdk-for-flutter