Skip to content

Commit

Permalink
Update date time when use sendEvent()
Browse files Browse the repository at this point in the history
  • Loading branch information
nqhhdev committed Jun 26, 2024
1 parent ad561ad commit 34e974e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/room.dart
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,7 @@ class Room {
String? editEventId,
String? threadRootEventId,
String? threadLastEventId,
DateTime? sentDate,
}) async {
// Create new transaction id
final String messageID;
Expand Down Expand Up @@ -854,7 +855,6 @@ class Room {
content['formatted_body'] = '* ${content['formatted_body']}';
}
}
final sentDate = DateTime.now();
final syncUpdate = SyncUpdate(
nextBatch: '',
rooms: RoomsUpdate(
Expand All @@ -867,7 +867,7 @@ class Room {
type: type,
eventId: messageID,
senderId: client.userID!,
originServerTs: sentDate,
originServerTs: sentDate ?? DateTime.now(),
unsigned: {
messageSendingStatusKey: EventStatus.sending.intValue,
'transaction_id': messageID,
Expand Down

0 comments on commit 34e974e

Please sign in to comment.