Render identicons in notifications
Render an svg, then canvas, then data url. Fixes #325 // FREEBIE
This commit is contained in:
parent
3bd9108f6e
commit
0ebdf08ceb
4 changed files with 90 additions and 11 deletions
|
@ -93,14 +93,16 @@
|
|||
var sender = ConversationController.create({id: message.get('source')});
|
||||
conversation.fetch().then(function() {
|
||||
sender.fetch().then(function() {
|
||||
var notification = new Notification(sender.getTitle(), {
|
||||
body: message.getDescription(),
|
||||
icon: sender.getAvatar().url,
|
||||
tag: conversation.id
|
||||
sender.getNotificationIcon().then(function(icon) {
|
||||
var notification = new Notification(sender.getTitle(), {
|
||||
body: message.getDescription(),
|
||||
icon: icon,
|
||||
tag: conversation.id
|
||||
});
|
||||
notification.onclick = function() {
|
||||
openConversation(conversation);
|
||||
};
|
||||
});
|
||||
notification.onclick = function() {
|
||||
openConversation(conversation);
|
||||
};
|
||||
});
|
||||
});
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue