|
|
@ -397,12 +397,10 @@ extension MessageReceiver {
|
|
|
|
let infoMessage = TSInfoMessage(timestamp: messageSentTimestamp, in: thread, messageType: .groupCreated)
|
|
|
|
let infoMessage = TSInfoMessage(timestamp: messageSentTimestamp, in: thread, messageType: .groupCreated)
|
|
|
|
infoMessage.save(with: transaction)
|
|
|
|
infoMessage.save(with: transaction)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var configuration: OWSDisappearingMessagesConfiguration
|
|
|
|
let isExpirationTimerEnabled = (expireTimer > 0)
|
|
|
|
if (expireTimer > 0) {
|
|
|
|
let expirationTimerDuration = (isExpirationTimerEnabled ? expireTimer : 24 * 60 * 60)
|
|
|
|
configuration = OWSDisappearingMessagesConfiguration(threadId: thread.uniqueId!, enabled: true, durationSeconds: expireTimer)
|
|
|
|
let configuration = OWSDisappearingMessagesConfiguration(threadId: thread.uniqueId!, enabled: isExpirationTimerEnabled,
|
|
|
|
} else {
|
|
|
|
durationSeconds: expirationTimerDuration)
|
|
|
|
configuration = OWSDisappearingMessagesConfiguration(threadId: thread.uniqueId!, enabled: false, durationSeconds: 24 * 60 * 60)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
configuration.save(with: transaction)
|
|
|
|
configuration.save(with: transaction)
|
|
|
|
// Add the group to the user's set of public keys to poll for
|
|
|
|
// Add the group to the user's set of public keys to poll for
|
|
|
|
Storage.shared.addClosedGroupPublicKey(groupPublicKey, using: transaction)
|
|
|
|
Storage.shared.addClosedGroupPublicKey(groupPublicKey, using: transaction)
|
|
|
|