diff --git a/Plugins/FriendNotifications/FriendNotifications.plugin.js b/Plugins/FriendNotifications/FriendNotifications.plugin.js
index a409538b97..13fb64e1e5 100644
--- a/Plugins/FriendNotifications/FriendNotifications.plugin.js
+++ b/Plugins/FriendNotifications/FriendNotifications.plugin.js
@@ -3,7 +3,7 @@
class FriendNotifications {
getName () {return "FriendNotifications";}
- getVersion () {return "1.2.4";}
+ getVersion () {return "1.2.5";}
getAuthor () {return "DevilBro";}
@@ -11,7 +11,7 @@ class FriendNotifications {
initConstructor () {
this.changelog = {
- "improved":[["New Settings Interface","Completely new settings interface to more easily customize your notifications"],["New Options","You can now observe users for any kind of status changes (online, mobile, idle, dnd, streaming, offline)"],["Merged FriendNotifications and StalkerNotifications","Since both of these plugins now work the same, I decided to merge them. FriendNotifications will be continued and StalkerNotifications will be disconntinued. You can find the old StalkerNotifications settings in the FriendNotifications settings. All old configurations of FriendNotifications and StalkerNotifications should have been merged"]],
+ "improved":[["Notification Message","You can now customize the message depending on the status"]],
"fixed":[["Settings Bug","Fixed the bug where disabling/changing settings for users would not work, unless the plugin was restarted"],["Log Bug","Fixed the bug where the time log would display weirdly"]]
};
@@ -118,18 +118,18 @@ class FriendNotifications {
}`;
this.defaults = {
- configs: {
- online: {value:true, toasttext:"STATUS_ONLINE"},
- mobile: {value:true, toasttext:"STATUS_ONLINE_MOBILE"},
- idle: {value:false, toasttext:"STATUS_IDLE"},
- dnd: {value:false, toasttext:"STATUS_DND"},
- streaming: {value:false, toasttext:"STATUS_STREAMING"},
- offline: {value:true, toasttext:"STATUS_OFFLINE"}
- },
settings: {
muteOnDND: {value:false, description:"Do not notify me when I am DnD:"},
openOnClick: {value:false, description:"Open the DM when you click a Notification:"}
},
+ notificationstrings: {
+ online: {value:"$user changed status to '$status'", libstring:"STATUS_ONLINE", init:true},
+ mobile: {value:"$user changed status to '$status'", libstring:"STATUS_ONLINE_MOBILE", init:true},
+ idle: {value:"$user changed status to '$status'", libstring:"STATUS_IDLE", init:false},
+ dnd: {value:"$user changed status to '$status'", libstring:"STATUS_DND", init:false},
+ streaming: {value:"$user changed status to '$status'", libstring:"STATUS_STREAMING", init:false},
+ offline: {value:"$user changed status to '$status'", libstring:"STATUS_OFFLINE", init:true}
+ },
notificationsounds: {
toastonline: {value:{url:null,song:null,mute:false}},
toastmobile: {value:{url:null,song:null,mute:false}},
@@ -154,6 +154,7 @@ class FriendNotifications {
if (!global.BDFDB || typeof BDFDB != "object" || !BDFDB.loaded || !this.started) return;
let settings = BDFDB.getAllData(this, "settings");
+ let notificationstrings = BDFDB.getAllData(this, "notificationstrings");
let notificationsounds = BDFDB.getAllData(this, "notificationsounds");
let amounts = BDFDB.getAllData(this, "amounts");
@@ -171,7 +172,7 @@ class FriendNotifications {
if ("Notification" in window) settingshtml += `
Rightclick on an Icon to toggle Notifications for that User:
`;
settingshtml += `
Click/Rightclick on the table headers to batch set all Friends
`;
settingshtml += `
TYPE
DISABLE
`;
- for (let config in this.defaults.configs) settingshtml += `
${config.toUpperCase()}
`;
+ for (let config in this.defaults.notificationstrings) settingshtml += `
${config.toUpperCase()}
`;
settingshtml += `
`;
for (let id of friendIDs) {
let user = this.UserUtils.getUser(id);
@@ -188,7 +189,7 @@ class FriendNotifications {
settingshtml += `
Click/Rightclick on the table headers to batch set all Non-Friends
`;
settingshtml += `
Add Non-Friend:
`;
settingshtml += `
TYPE
DISABLE
`;
- for (let config in this.defaults.configs) settingshtml += `
${config.toUpperCase()}
`;
+ for (let config in this.defaults.notificationstrings) settingshtml += `
${config.toUpperCase()}
`;
settingshtml += `
`;
for (let id in nonfriends) if (!friendIDs.includes(id)) {
let user = this.UserUtils.getUser(id);
@@ -202,8 +203,14 @@ class FriendNotifications {
settingshtml += `
Timelog
`;
settingshtml += `
Timelog of LogIns/-Outs:
`;
settingshtml += `
`;
- settingshtml += `
Sound Settings
`;
- for (let key in notificationsounds) if (key.indexOf("desktop") == -1 || "Notification" in window) settingshtml += `
${key} notification sound:
Mute:
`;
+ settingshtml += `
Notification Message Settings
`;
+ settingshtml += `
Allows you to configure your own message strings for the different statuses. $user is the placeholder for the username and $status for the statusname.
`;
+ for (let config in notificationstrings) {
+ settingshtml += `