If for some reason a group has no name, provide a default
This commit is contained in:
parent
0036e4ef74
commit
0bd5f3e3c2
1 changed files with 2 additions and 1 deletions
|
@ -7,6 +7,7 @@ var Whisper = Whisper || {};
|
|||
var Thread = Backbone.Model.extend({
|
||||
defaults: function() {
|
||||
return {
|
||||
name: 'New Group',
|
||||
image: '/images/default.png',
|
||||
unreadCount: 0,
|
||||
timestamp: new Date().getTime(),
|
||||
|
@ -97,7 +98,7 @@ var Whisper = Whisper || {};
|
|||
if (decrypted.message.group) {
|
||||
attributes = {
|
||||
groupId : decrypted.message.group.id,
|
||||
name : decrypted.message.group.name,
|
||||
name : decrypted.message.group.name || 'New group',
|
||||
type : 'group',
|
||||
};
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue