Fix Android compatibility issue

This commit is contained in:
nielsandriesse 2020-12-09 10:25:19 +11:00
parent 97d0160138
commit f0f0a627ec
1 changed files with 5 additions and 0 deletions

View File

@ -86,6 +86,11 @@ public final class VisibleMessage : Message {
let attachmentProtos = attachments.compactMap { $0.buildProto() }
dataMessage.setAttachments(attachmentProtos)
// TODO: Contact
// Expiration timer
// TODO: We * want * expiration timer updates to be explicit. But currently Android will disable the expiration timer for a conversation
// if it receives a message without the current expiration timer value attached to it...
let expiration = OWSDisappearingMessagesConfiguration.fetch(uniqueId: threadID!, transaction: transaction)?.durationSeconds ?? 0
dataMessage.setExpireTimer(expiration)
// Group context
do {
try setGroupContextIfNeeded(on: dataMessage, using: transaction)