fix: outdated banner showing and updating on messages properly

This commit is contained in:
0x330a
2024-01-18 13:46:46 +11:00
parent 1ada072884
commit 106305f118
3 changed files with 24 additions and 6 deletions

View File

@@ -335,6 +335,17 @@ fun MessageReceiver.handleVisibleMessage(
if (userPublicKey != messageSender && !isUserBlindedSender) {
storage.setBlocksCommunityMessageRequests(recipient, message.blocksMessageRequests)
}
// update the disappearing / legacy banner for the sender
val disappearingState = when {
proto.dataMessage.expireTimer > 0 && !proto.hasExpirationType() -> Recipient.DisappearingState.LEGACY
else -> Recipient.DisappearingState.UPDATED
}
storage.updateDisappearingState(
messageSender,
threadID,
disappearingState
)
}
// Parse quote if needed
var quoteModel: QuoteModel? = null