Insert timer update messages when inferring timer changes

This commit is contained in:
lilia 2016-09-28 18:33:17 -07:00
parent ad2174e279
commit 7a26cf79ee

View file

@ -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');