Calling support
This commit is contained in:
parent
83574eb067
commit
d3a27a6442
72 changed files with 3864 additions and 191 deletions
|
@ -21,15 +21,6 @@
|
|||
MESSAGE: 'message',
|
||||
};
|
||||
|
||||
function filter(text) {
|
||||
return (text || '')
|
||||
.replace(/&/g, '&')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>');
|
||||
}
|
||||
|
||||
Whisper.Notifications = new (Backbone.Collection.extend({
|
||||
initialize() {
|
||||
this.isEnabled = false;
|
||||
|
@ -164,13 +155,16 @@
|
|||
|
||||
drawAttention();
|
||||
|
||||
this.lastNotification = new Notification(title, {
|
||||
body: window.platform === 'linux' ? filter(message) : message,
|
||||
this.lastNotification = window.Signal.Services.notify({
|
||||
platform: window.platform,
|
||||
title,
|
||||
icon: iconUrl,
|
||||
message,
|
||||
silent: !status.shouldPlayNotificationSound,
|
||||
onNotificationClick: () => {
|
||||
this.trigger('click', last.conversationId, last.messageId);
|
||||
},
|
||||
});
|
||||
this.lastNotification.onclick = () =>
|
||||
this.trigger('click', last.conversationId, last.messageId);
|
||||
|
||||
// We continue to build up more and more messages for our notifications
|
||||
// until the user comes back to our app or closes the app. Then we’ll
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue