mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
Do not drop 1:1 messages with mentions due to iOS and desktop regression.
iOS and Desktop both regressed in multi-forwarding by including mentions in 1:1 forwards instead of replacing them with plain text. Android by default drops these as invalid messages. Since there are clients in the wild that do this now, we have to stop dropping them and try to resolve them per normal mechanisms.
This commit is contained in:
@@ -52,7 +52,7 @@ public class ConversationMessage {
|
||||
this.body = null;
|
||||
}
|
||||
|
||||
if (!this.mentions.isEmpty() && this.body != null) {
|
||||
if (!this.mentions.isEmpty() && this.body != null && this.messageRecord.isGroupV2()) {
|
||||
MentionAnnotation.setMentionAnnotations(this.body, this.mentions);
|
||||
}
|
||||
|
||||
|
||||
@@ -1041,7 +1041,7 @@ public final class SignalServiceContent {
|
||||
}
|
||||
|
||||
if (mentions.size() > 0 && !isGroupV2) {
|
||||
throw new InvalidMessageStructureException("Mentions received in non-GV2 message");
|
||||
Log.w(TAG, "Mentions received in non-GV2 message");
|
||||
}
|
||||
|
||||
return mentions;
|
||||
|
||||
Reference in New Issue
Block a user