@@ -2,6 +2,7 @@ var elements = require("../../../gp2/elements.js");
22var dialogs = require ( "../../../dialogs.js" ) ;
33var sws = require ( "../sharedwebsocket.js" ) ;
44var audio = require ( "../../../audio.js" ) ;
5+ var sounds = require ( "../sounds.js" ) ;
56var clientSettings = require ( "../clientsettings.js" ) ;
67var accountHelper = require ( "../../../accounthelper/index.js" ) ;
78var notify = require ( "../notify.js" ) ;
@@ -81,7 +82,7 @@ class RealTimeNotifications {
8182 {
8283 element : "p" ,
8384 textContent :
84- "You'll recive notifications actions such as invites to people from other rooms ." ,
85+ "You'll recive notifications here from certain things, such as invites to chatrooms ." ,
8586 } ,
8687 {
8788 element : "p" ,
@@ -228,23 +229,31 @@ class RealTimeNotifications {
228229 this . notifications = this . notifications . slice ( - 100 ) ;
229230 this . loadNotifications ( ) ;
230231 var notification = json . notification ;
232+ if ( clientSettings . getSetting ( "UI_SOUNDS" ) ) {
233+ sounds . play ( "notificationBell" , 1 ) ;
234+ }
231235 if (
232236 notification . type == "test" &&
233237 clientSettings . getSetting ( "BELL_NOTIFCATIONS" )
234238 ) {
235- notify . sendIfNotOnScreen ( "notification" , "Test notification" ) ;
239+ notify . sendIfNotOnScreen (
240+ "Testing" ,
241+ "Test notification" ,
242+ "New notification received"
243+ ) ;
236244 }
237245 if (
238246 notification . type == "invite" &&
239247 clientSettings . getSetting ( "BELL_NOTIFCATIONS" )
240248 ) {
241249 notify . sendIfNotOnScreen (
242- "notification " ,
250+ "Chatroom Invitation " ,
243251 "@" +
244252 notification . from +
245253 ' has invited you to the chat room "' +
246254 notification . roomName +
247- '"'
255+ '"' ,
256+ "Invited to " + notification . roomName
248257 ) ;
249258 }
250259 }
0 commit comments