Channel chat: Resend action on own messages

Long-pressing one of your own channel messages offers Resend. It sends the same text again as a new message, using the channel's flood scope like a normal send. Useful when no repeats of the first copy were heard.
This commit is contained in:
Juraj Bednar committed 2026-11-22 16:50:43 +01:00
1 parent 9ac915bdf2
commit 5059676df3
42 files changed
+127

No files matched your search

+19
View File
@@ -5623,6 +5623,25 @@ class MeshCoreConnector extends ChangeNotifier {
}
}
/// Sends an own channel message again as a new message (new timestamp),
/// so repeaters forward it even if they already saw the first copy.
/// Uses the channel's current flood scope, like a normal send.
Future<void> resendChannelMessage(
Channel channel,
ChannelMessage message,
) async {
if (!message.isOutgoing) return;
final replyToId = message.replyToMessageId;
await sendChannelMessage(
channel,
message.fullText,
originalText: message.originalText,
translatedLanguageCode: message.translatedLanguageCode,
translationModelId: message.translationModelId,
replyTo: replyToId == null ? null : _findChannelMessageById(replyToId),
);
}
Future<void> sendChannelMessage(
Channel channel,
String text, {