Don't pop conversations with timer change to top (#2084)

* Don't re-sort conversation list after expiration timer change

Now that we respond to the expiration timer included in contact and
group sync messages, we need to ensure that this doesn't pop
conversations to the top of the list.

* Introduce explaining variable for updateLastMessage filter
This commit is contained in:
Scott Nonnenberg 2018-02-28 17:26:41 -08:00 committed by GitHub
parent caa579f3b8
commit 634f1ae9f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -675,7 +675,9 @@
return collection.fetchConversation(this.id, 1).then(function() {
var lastMessage = collection.at(0);
if (lastMessage) {
if (lastMessage.get('type') === 'verified-change') {
var type = lastMessage.get('type');
var shouldSkipUpdate = type === 'verified-change' || lastMessage.get('expirationTimerUpdate');
if (shouldSkipUpdate) {
return;
}
this.set({