From 3073ef7d83ee0b3a163944a9b523c9144a9c0313 Mon Sep 17 00:00:00 2001 From: lilia Date: Wed, 6 Sep 2017 11:40:05 +0200 Subject: [PATCH] Log when conversation names are nullified This should help us track down the source of disappearing conversation names, as seen in #1428. // FREEBIE --- js/models/conversations.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/models/conversations.js b/js/models/conversations.js index 14ac4ba587..08b2cd31c1 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -73,6 +73,13 @@ this.on('change:avatar', this.updateAvatarUrl); this.on('destroy', this.revokeAvatarUrl); + + this.on('change:name', function(model, value, options) { + if (typeof value !== 'string' || !value.length) { + var e = new Error(model.id + ' name changed to ' + value); + console.log(e.stack); + } + }); }, isMe: function() {