Added value to Message fourByteRoomContactKey which holds the first 4 bytes of the contacts pub key that posted the message to the room.

This commit is contained in:
Winston Lowe
2026-01-09 00:03:50 -08:00
parent fca810737d
commit 367f89fb1b
3 changed files with 15 additions and 9 deletions
+5
View File
@@ -23,6 +23,7 @@ class Message {
final int? pathLength;
final Uint8List pathBytes;
final Map<String, int> reactions;
final Uint8List fourByteRoomContactKey;
Message({
required this.senderKey,
@@ -40,8 +41,10 @@ class Message {
this.tripTimeMs,
this.pathLength,
Uint8List? pathBytes,
Uint8List? fourByteRoomContactKey,
Map<String, int>? reactions,
}) : pathBytes = pathBytes ?? Uint8List(0),
fourByteRoomContactKey = fourByteRoomContactKey ?? Uint8List(0),
reactions = reactions ?? {};
String get senderKeyHex => pubKeyToHex(senderKey);
@@ -58,6 +61,7 @@ class Message {
Uint8List? pathBytes,
bool? isCli,
Map<String, int>? reactions,
Uint8List? fourByteRoomContactKey,
}) {
return Message(
senderKey: senderKey,
@@ -76,6 +80,7 @@ class Message {
pathLength: pathLength ?? this.pathLength,
pathBytes: pathBytes ?? this.pathBytes,
reactions: reactions ?? this.reactions,
fourByteRoomContactKey: fourByteRoomContactKey ?? this.fourByteRoomContactKey,
);
}