fix
This commit is contained in:
parent
556bc5c572
commit
d16e6c46c7
|
@ -1623,11 +1623,8 @@ var BDFDB = {myPlugins: BDFDB && BDFDB.myPlugins || {}, cleanUps: BDFDB && BDFDB
|
|||
});
|
||||
BDFDB.UserUtils.getStatus = function (id = BDFDB.UserUtils.me.id) {
|
||||
id = typeof id == "number" ? id.toFixed() : id;
|
||||
return BDFDB.UserUtils.isStreaming(id) ? "streaming" : LibraryModules.StatusMetaUtils.getStatus(id);
|
||||
};
|
||||
BDFDB.UserUtils.isStreaming = function (id = BDFDB.UserUtils.me.id) {
|
||||
for (let activity of LibraryModules.StatusMetaUtils.getActivities(id)) if (activity.type == BDFDB.DiscordConstants.ActivityTypes.STREAMING) return true;
|
||||
return false;
|
||||
let activity = BDFDB.UserUtils.getActivitiy(id);
|
||||
return activity && activity.type == BDFDB.DiscordConstants.ActivityTypes.STREAMING ? "streaming" : LibraryModules.StatusMetaUtils.getStatus(id);
|
||||
};
|
||||
BDFDB.UserUtils.getStatusColor = function (status) {
|
||||
status = typeof status == "string" ? status.toLowerCase() : null;
|
||||
|
@ -1642,6 +1639,10 @@ var BDFDB = {myPlugins: BDFDB && BDFDB.myPlugins || {}, cleanUps: BDFDB && BDFDB
|
|||
default: return BDFDB.DiscordConstants.Colors.STATUS_GREY;
|
||||
}
|
||||
};
|
||||
BDFDB.UserUtils.getActivitiy = 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;
|
||||
};
|
||||
BDFDB.UserUtils.getAvatar = function (id = BDFDB.UserUtils.me.id) {
|
||||
var user = LibraryModules.UserStore.getUser(typeof id == "number" ? id.toFixed() : id);
|
||||
if (!user) return "https://discordapp.com/assets/322c936a8c8be1b803cd94861bdfa868.png";
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -467,7 +467,7 @@ class FriendNotifications {
|
|||
getStatusWithMobileAndActivity (id, config) {
|
||||
let statusname = BDFDB.UserUtils.getStatus(id);
|
||||
let status = {statusname, isactivity:false};
|
||||
let activity = BDFDB.LibraryModules.StatusMetaUtils.getPrimaryActivity(id);
|
||||
let activity = BDFDB.UserUtils.getActivitiy(id);
|
||||
if (activity && this.activityTypes[activity.type]) {
|
||||
let activityname = this.activityTypes[activity.type].toLowerCase();
|
||||
if (this.defaults.notificationstrings[activityname] && config[activityname]) {
|
||||
|
|
Loading…
Reference in New Issue