mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-13 11:42:17 -04:00
everything but reconcile
This commit is contained in:
parent
37f6ca19f7
commit
6d05c9f125
8 changed files with 305 additions and 150 deletions
|
@ -28,8 +28,10 @@ class MessageState with _$MessageState {
|
|||
// Content of the message
|
||||
@JsonKey(fromJson: proto.messageFromJson, toJson: proto.messageToJson)
|
||||
required proto.Message content,
|
||||
// Received or delivered timestamp
|
||||
required Timestamp timestamp,
|
||||
// Sent timestamp
|
||||
required Timestamp sentTimestamp,
|
||||
// Reconciled timestamp
|
||||
required Timestamp? reconciledTimestamp,
|
||||
// The state of the message
|
||||
required MessageSendState? sendState,
|
||||
}) = _MessageState;
|
||||
|
@ -37,11 +39,3 @@ class MessageState with _$MessageState {
|
|||
factory MessageState.fromJson(dynamic json) =>
|
||||
_$MessageStateFromJson(json as Map<String, dynamic>);
|
||||
}
|
||||
|
||||
extension MessageStateExt on MessageState {
|
||||
Uint8List get uniqueId {
|
||||
final author = content.author.toVeilid().decode();
|
||||
final id = content.id;
|
||||
return author..addAll(id);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue