Improve notification contents
Include sensible descriptions of non-content messages. For group messages, display the sender's name and avatar rather than the group's.
This commit is contained in:
@@ -43,6 +43,16 @@
|
||||
isIncoming: function() {
|
||||
return this.get('type') === 'incoming';
|
||||
},
|
||||
getDescription: function() {
|
||||
if (this.isGroupUpdate()) {
|
||||
return 'Updated the group';
|
||||
}
|
||||
if (this.isEndSession()) {
|
||||
return 'Secure session ended';
|
||||
}
|
||||
|
||||
return this.get('body');
|
||||
},
|
||||
getContact: function() {
|
||||
if (this.collection) {
|
||||
return this.collection.conversation.contactCollection.get(this.get('source'));
|
||||
|
Reference in New Issue
Block a user