Skip to content

Commit 3da54fc

Browse files
fix realtime timestamp to int
1 parent 8597e87 commit 3da54fc

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.0.2
2+
- Fix timestamp in Realtime Response to Integer
3+
14
## 1.0.1
25
- Fix null pointer exception while creating OAuth2 session
36
- Export RealtimeMessage

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Add this to your package's `pubspec.yaml` file:
2121

2222
```yml
2323
dependencies:
24-
appwrite: ^1.0.1
24+
appwrite: ^1.0.2
2525
```
2626
2727
You can install packages from the command line:

lib/src/client_browser.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
3333
.replaceFirst('http://', 'ws://');
3434
_headers = {
3535
'content-type': 'application/json',
36-
'x-sdk-version': 'appwrite:flutter:1.0.1',
36+
'x-sdk-version': 'appwrite:flutter:1.0.2',
3737
'X-Appwrite-Response-Format' : '0.10.0',
3838
};
3939

lib/src/client_io.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class ClientIO extends ClientBase with ClientMixin {
5252
.replaceFirst('http://', 'ws://');
5353
this._headers = {
5454
'content-type': 'application/json',
55-
'x-sdk-version': 'appwrite:flutter:1.0.1',
55+
'x-sdk-version': 'appwrite:flutter:1.0.2',
5656
'X-Appwrite-Response-Format' : '0.10.0',
5757
};
5858

lib/src/realtime_message.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class RealtimeMessage {
55
final String event;
66
final Map<String, dynamic> payload;
77
final List<String> channels;
8-
final DateTime timestamp;
8+
final int timestamp;
99
RealtimeMessage({
1010
required this.event,
1111
required this.payload,
@@ -17,7 +17,7 @@ class RealtimeMessage {
1717
String? event,
1818
Map<String, dynamic>? payload,
1919
List<String>? channels,
20-
DateTime? timestamp,
20+
int? timestamp,
2121
}) {
2222
return RealtimeMessage(
2323
event: event ?? this.event,
@@ -32,7 +32,7 @@ class RealtimeMessage {
3232
'event': event,
3333
'payload': payload,
3434
'channels': channels,
35-
'timestamp': timestamp.millisecondsSinceEpoch,
35+
'timestamp': timestamp,
3636
};
3737
}
3838

@@ -41,7 +41,7 @@ class RealtimeMessage {
4141
event: map['event'],
4242
payload: Map<String, dynamic>.from(map['payload'] ?? <String, dynamic>{}),
4343
channels: List<String>.from(map['channels'] ?? []),
44-
timestamp: DateTime.fromMillisecondsSinceEpoch(map['timestamp']),
44+
timestamp: map['timestamp'],
4545
);
4646
}
4747

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: appwrite
2-
version: 1.0.1
2+
version: 1.0.2
33
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
44
homepage: https://appwrite.io
55
repository: https://github.com/appwrite/sdk-for-flutter

0 commit comments

Comments
 (0)