Preserve reply mentions and support copying image messages
This commit is contained in:
1 parent
ae967ec21f
commit
ee7b4c8f8b
6 files changed
+703
-6
No files matched your search
@@ -60,7 +60,7 @@ class BookmarkedMessage {
|
||||
sourceName: channelName,
|
||||
messageId: message.messageId,
|
||||
senderName: senderName,
|
||||
text: message.text,
|
||||
text: message.fullText,
|
||||
translatedText: message.translatedText,
|
||||
timestamp: message.timestamp,
|
||||
receivedAt: message.receivedAt,
|
||||
|
||||
@@ -109,6 +109,17 @@ class ChannelMessage {
|
||||
|
||||
bool get isFiltered => filterReason != null;
|
||||
|
||||
/// Full wire/sent text, restoring the `@[sender] ` reply prefix when it
|
||||
/// was split into [replyToSenderName] on storage.
|
||||
String get fullText {
|
||||
if (replyToMessageId != null &&
|
||||
replyToSenderName != null &&
|
||||
replyToSenderName!.isNotEmpty) {
|
||||
return '@[$replyToSenderName] $text';
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
String? get senderKeyHex =>
|
||||
senderKey != null ? pubKeyToHex(senderKey!) : null;
|
||||
|
||||
|
||||
Reference in new issue
Block a user