mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Fix story linking from private story reply.
This commit is contained in:
committed by
Cody Henthorne
parent
c3c8f8e7e6
commit
7af94f60ae
@@ -35,6 +35,7 @@ import org.thoughtcrime.securesms.crypto.SecurityEvent;
|
||||
import org.thoughtcrime.securesms.database.AttachmentTable;
|
||||
import org.thoughtcrime.securesms.database.CallTable;
|
||||
import org.thoughtcrime.securesms.database.GroupTable;
|
||||
import org.thoughtcrime.securesms.database.StorySendTable;
|
||||
import org.thoughtcrime.securesms.database.model.GroupRecord;
|
||||
import org.thoughtcrime.securesms.database.GroupReceiptTable;
|
||||
import org.thoughtcrime.securesms.database.GroupReceiptTable.GroupReceiptInfo;
|
||||
@@ -1750,12 +1751,20 @@ public final class MessageContentProcessor {
|
||||
|
||||
try {
|
||||
RecipientId storyAuthorRecipient = RecipientId.from(storyContext.getAuthorServiceId());
|
||||
RecipientId selfId = Recipient.self().getId();
|
||||
ParentStoryId parentStoryId;
|
||||
QuoteModel quoteModel = null;
|
||||
long expiresInMillis = 0L;
|
||||
MessageId storyMessageId = null;
|
||||
|
||||
try {
|
||||
MessageId storyMessageId = database.getStoryId(storyAuthorRecipient, storyContext.getSentTimestamp());
|
||||
if (selfId.equals(storyAuthorRecipient)) {
|
||||
storyMessageId = SignalDatabase.storySends().getStoryMessageFor(senderRecipient.getId(), storyContext.getSentTimestamp());
|
||||
}
|
||||
if (storyMessageId == null) {
|
||||
storyMessageId = database.getStoryId(storyAuthorRecipient, storyContext.getSentTimestamp());
|
||||
}
|
||||
|
||||
MmsMessageRecord story = (MmsMessageRecord) database.getMessageRecord(storyMessageId.getId());
|
||||
Recipient threadRecipient = Objects.requireNonNull(SignalDatabase.threads().getRecipientForThreadId(story.getThreadId()));
|
||||
boolean groupStory = threadRecipient.isActiveGroup();
|
||||
|
||||
Reference in New Issue
Block a user