Skip to content

Commit

Permalink
Don't pop conversations with timer change to top (#2084)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
scottnonnenberg authored Mar 1, 2018
1 parent caa579f commit 634f1ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/models/conversations.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 634f1ae

Please sign in to comment.