This commit is contained in:
Mirco Wittrien 2020-09-23 19:55:13 +02:00
parent 8a084e73f1
commit b5d67b9fb0
2 changed files with 4 additions and 4 deletions

View File

@ -2346,7 +2346,7 @@ module.exports = (_ => {
});
BDFDB.UserUtils.getStatus = function (id = BDFDB.UserUtils.me.id) {
id = typeof id == "number" ? id.toFixed() : id;
let activity = BDFDB.UserUtils.getActivitiy(id);
let activity = BDFDB.UserUtils.getActivity(id);
return activity && activity.type == BDFDB.DiscordConstants.ActivityTypes.STREAMING ? "streaming" : LibraryModules.StatusMetaUtils.getStatus(id);
};
BDFDB.UserUtils.getStatusColor = function (status) {
@ -2362,7 +2362,7 @@ module.exports = (_ => {
default: return BDFDB.DiscordConstants.Colors.STATUS_GREY;
}
};
BDFDB.UserUtils.getActivitiy = function (id = BDFDB.UserUtils.me.id) {
BDFDB.UserUtils.getActivity = function (id = BDFDB.UserUtils.me.id) {
for (let activity of LibraryModules.StatusMetaUtils.getActivities(id)) if (activity.type != BDFDB.DiscordConstants.ActivityTypes.CUSTOM_STATUS) return activity;
return null;
};

View File

@ -5,7 +5,7 @@ module.exports = (_ => {
"info": {
"name": "FriendNotifications",
"author": "DevilBro",
"version": "1.5.0",
"version": "1.5.1",
"description": "Notifies you when a Friend or a User your choose to observe changes their online status, can be configured individually in the settings."
}
};
@ -495,7 +495,7 @@ module.exports = (_ => {
getStatusWithMobileAndActivity (id, config) {
let statusName = BDFDB.UserUtils.getStatus(id);
let status = {statusName, isActivity:false};
let activity = BDFDB.UserUtils.getActivitiy(id);
let activity = BDFDB.UserUtils.getActivity(id);
if (activity && BDFDB.DiscordConstants.ActivityTypes[activity.type]) {
let activityName = BDFDB.DiscordConstants.ActivityTypes[activity.type].toLowerCase();
if (this.defaults.notificationstrings[activityName] && config[activityName]) {