everything but reconcile

This commit is contained in:
Christien Rioux 2024-05-29 10:47:43 -04:00
parent 37f6ca19f7
commit 6d05c9f125
8 changed files with 305 additions and 150 deletions

View file

@ -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);
}
}