Prevent expiration timer update on group update

It occurs when a message with a different expiration time is received.

The issue report highlights the scenario of a member leaving a group
(group update [quit] sent with expiration time = 0).

Fix https://github.com/WhisperSystems/Signal-Android/issues/5996
Fix https://github.com/WhisperSystems/Signal-iOS/issues/1566
This commit is contained in:
Thomas Guillet 2017-01-04 11:43:05 +01:00 committed by lilia
parent 9ef61d43f4
commit 400313f749

View file

@ -405,7 +405,7 @@
message.set({expireTimer: dataMessage.expireTimer});
}
if (!message.isEndSession()) {
if (!message.isEndSession() && !message.isGroupUpdate()) {
if (dataMessage.expireTimer) {
if (dataMessage.expireTimer !== conversation.get('expireTimer')) {
conversation.updateExpirationTimer(