diff --git a/js/models/messages.js b/js/models/messages.js index 95236ed9..d6bf4d17 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -366,8 +366,13 @@ conversation.set({expireTimer: dataMessage.expireTimer}); } else if (dataMessage.expireTimer) { message.set({expireTimer: dataMessage.expireTimer}); - // todo: insert an update if needed - conversation.set({expireTimer: dataMessage.expireTimer}); + } + if (dataMessage.expireTimer) { + if (dataMessage.expireTimer !== conversation.get('expireTimer')) { + conversation.addExpirationTimerUpdate(dataMessage.expireTimer, source); + } + } else if (conversation.get('expireTimer')) { + conversation.addExpirationTimerUpdate(0, source); } var conversation_timestamp = conversation.get('timestamp');