Render identicons in notifications

Render an svg, then canvas, then data url.

Fixes #325

// FREEBIE
This commit is contained in:
lilia 2015-09-10 00:46:50 -07:00
parent 3bd9108f6e
commit 0ebdf08ceb
4 changed files with 90 additions and 11 deletions

View file

@ -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 {