Add avatar as notifications icon
This commit is contained in:
parent
03a9df81ec
commit
40cab75f96
@ -604,8 +604,10 @@ function onMsgOrFileReceived(sessionId, outgoing, body) {
|
|||||||
}
|
}
|
||||||
if (document.hidden && !outgoing) {
|
if (document.hidden && !outgoing) {
|
||||||
if (notificationAllowed) {
|
if (notificationAllowed) {
|
||||||
new Notification(sessionsData.get(sessionId).name, {
|
let sessionName = sessionsData.get(sessionId).name;
|
||||||
"body": body
|
new Notification(sessionName, {
|
||||||
|
"body": body,
|
||||||
|
"icon": "/avatar/"+sessionId+"/"+sessionName+"?"+avatarTimestamps.get(sessionId)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -698,7 +700,8 @@ function onAskLargeFiles(sessionId, encodedDownloadLocation, filesInfo) {
|
|||||||
showPopup(mainDiv, false);
|
showPopup(mainDiv, false);
|
||||||
if (document.hidden && notificationAllowed) {
|
if (document.hidden && notificationAllowed) {
|
||||||
new Notification(sessionName, {
|
new Notification(sessionName, {
|
||||||
"body": "Files download request"
|
"body": "Files download request",
|
||||||
|
"icon": "/avatar/"+sessionId+"/"+sessionName+"?"+avatarTimestamps.get(sessionId)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user