mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 02:10:44 +01:00
Add story distribution list deduplication handling.
This commit is contained in:
@@ -1564,16 +1564,14 @@ public final class MessageContentProcessor {
|
||||
|
||||
if (message.getGroupContext().isPresent()) {
|
||||
parentStoryId = new ParentStoryId.GroupReply(storyMessageId.getId());
|
||||
} else {
|
||||
} else if (SignalDatabase.storySends().canReply(senderRecipient.getId(), storyContext.getSentTimestamp())) {
|
||||
MmsMessageRecord story = (MmsMessageRecord) database.getMessageRecord(storyMessageId.getId());
|
||||
|
||||
if (!story.getStoryType().isStoryWithReplies()) {
|
||||
warn(content.getTimestamp(), "Story has replies disabled. Dropping reply.");
|
||||
return;
|
||||
}
|
||||
|
||||
parentStoryId = new ParentStoryId.DirectReply(storyMessageId.getId());
|
||||
quoteModel = new QuoteModel(storyContext.getSentTimestamp(), storyAuthorRecipient, "", false, story.getSlideDeck().asAttachments(), Collections.emptyList());
|
||||
quoteModel = new QuoteModel(storyContext.getSentTimestamp(), storyAuthorRecipient, message.getBody().orElse(""), false, story.getSlideDeck().asAttachments(), Collections.emptyList());
|
||||
} else {
|
||||
warn(content.getTimestamp(), "Story has replies disabled. Dropping reply.");
|
||||
return;
|
||||
}
|
||||
} catch (NoSuchMessageException e) {
|
||||
warn(content.getTimestamp(), "Couldn't find story for reply.", e);
|
||||
|
||||
Reference in New Issue
Block a user