Skip to content

Commit f4110b3

Browse files
committed
Notifications
1 parent bed2de3 commit f4110b3

3 files changed

Lines changed: 21 additions & 4 deletions

File tree

src/chat/interface/clientsettings.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class ClientSettingsMenu {
99
UI_SOUNDS: true,
1010
JOKE_COMMANDS: true,
1111
BRACKET_CODE_SOUNDS: true,
12+
BELL_NOTIFICATIONS: true,
1213
};
1314
this.settings = {};
1415
this.settingsList = [
@@ -17,6 +18,11 @@ class ClientSettingsMenu {
1718
id: "CHAT_NOTIFY",
1819
type: "on-off",
1920
},
21+
{
22+
name: "Bell Icon Notifcations:",
23+
id: "BELL_NOTIFICATIONS",
24+
type: "on-off",
25+
},
2026
{
2127
name: "Interface sounds",
2228
id: "UI_SOUNDS",

src/chat/interface/notifications/index.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,12 @@ class RealTimeNotifications {
8181
{
8282
element: "p",
8383
textContent:
84-
"Clicking on any notification would remove it, if it's an invite then it would also open the room select.",
84+
"You'll recive notifications actions such as invites to people from other rooms.",
85+
},
86+
{
87+
element: "p",
88+
textContent:
89+
"To dismiss your notifications, use the Remove All button, or for a single one just click the Remove button.",
8590
},
8691
],
8792
},
@@ -223,10 +228,16 @@ class RealTimeNotifications {
223228
this.notifications = this.notifications.slice(-100);
224229
this.loadNotifications();
225230
var notification = json.notification;
226-
if (notification.type == "test") {
231+
if (
232+
notification.type == "test" &&
233+
clientSettings.getSetting("BELL_NOTIFCATIONS")
234+
) {
227235
notify.sendIfNotOnScreen("notification", "Test notification");
228236
}
229-
if (notification.type == "invite") {
237+
if (
238+
notification.type == "invite" &&
239+
clientSettings.getSetting("BELL_NOTIFCATIONS")
240+
) {
230241
notify.sendIfNotOnScreen(
231242
"notification",
232243
"@" +

wpstatic/version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"timestamp":"1761229680692"}
1+
{"timestamp":"1761230343991"}

0 commit comments

Comments
 (0)