Fix edit message clearing story reply quote.

This commit is contained in:
Clark
2024-07-19 14:22:21 -04:00
committed by Nicholas Tinsley
parent 0aeaec8b67
commit bc6face873
2 changed files with 15 additions and 2 deletions

View File

@@ -122,7 +122,7 @@ object EditMessageProcessor {
): InsertResult? {
val messageRanges: BodyRangeList? = message.bodyRanges.filter { it.mentionAci == null }.toList().toBodyRangeList()
val targetQuote = targetMessage.quote
val quote: QuoteModel? = if (targetQuote != null && message.quote != null) {
val quote: QuoteModel? = if (targetQuote != null && (message.quote != null || (targetMessage.parentStoryId != null && message.storyContext != null))) {
QuoteModel(
targetQuote.id,
targetQuote.author,
@@ -153,6 +153,7 @@ object EditMessageProcessor {
groupId = groupId,
attachments = attachments,
quote = quote,
parentStoryId = targetMessage.parentStoryId,
sharedContacts = emptyList(),
linkPreviews = DataMessageProcessor.getLinkPreviews(message.preview, message.body ?: "", false),
mentions = DataMessageProcessor.getMentions(message.bodyRanges),
@@ -188,6 +189,7 @@ object EditMessageProcessor {
receivedTimeMillis = targetMessage.dateReceived,
body = message.body,
groupId = groupId,
parentStoryId = targetMessage.parentStoryId,
expiresIn = targetMessage.expiresIn,
isUnidentified = metadata.sealedSender,
serverGuid = envelope.serverGuid