-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix In App Notifications #397
base: main
Are you sure you want to change the base?
Conversation
Taken from [Reddit](https://www.reddit.com/r/BetterDiscord/comments/1dlk72j/does_anyone_know_of_a_working_inappnotification/) Might have a better solution, but this appears to work
might as well just delete the mentions to the code as it is in this PR is incomplete because there's no checking if the role(s) mentioned in the message are roles that you have, so you get notifications for random shit in random servers i can't push a commit to this branch, but i would roll back the version marker to 1.1.5, and change lines 996-1009 to this const currentUserId = UserStore.getCurrentUser().id;
const mentionedUsers = message.mentions.map(user => user.id);
const messageRoles = message.mention_roles;
let roleMentioned = false;
if (message.mention_roles) {
const currentUserRoles = GuildMemberStore.getSelfMember(message.guild_id).roles;
roleMentioned = (currentUserRoles.some(i => messageRoles.includes(i)));
}
return mentionedUsers.includes(currentUserId) ||
(!suppressEveryone && message.mention_everyone) ||
(!suppressRoles && message.mention_roles.length > 0 && roleMentioned); |
I assume that's the changes you wanted? Let me know if there is anything else! |
spacing is a lil funky, and qwert can probably update the changelog properly on their own, but yeah that does look mostly right! missing removing the import on |
Yeah sorry about that, worked a bit from my phone. Do you want me to change the changelogs back? or just leave the PR as it is? |
I don't know about others but in my case this plugin doesn't turn on when starting DSC. When trying to turn it off, it shows information that it can't be stopped and only re-enabling it helps. |
Taken from Reddit
Might have a better solution, but this appears to work