Update QuickMention.plugin.js

This commit is contained in:
Mirco Wittrien 2020-10-06 23:58:54 +02:00
parent 9afbe458d1
commit f18fbda328
1 changed files with 2 additions and 3 deletions

View File

@ -5,7 +5,7 @@ module.exports = (_ => {
"info": { "info": {
"name": "QuickMention", "name": "QuickMention",
"author": "DevilBro", "author": "DevilBro",
"version": "1.0.1", "version": "1.0.2",
"description": "Adds a mention entry to the message option toolbar." "description": "Adds a mention entry to the message option toolbar."
} }
}; };
@ -45,7 +45,7 @@ module.exports = (_ => {
onStop() {} onStop() {}
onMessageOptionToolbar (e) { onMessageOptionToolbar (e) {
if (!e.instance.props.expanded && e.instance.props.message.author.id != BDFDB.UserUtils.me.id && e.instance.props.message.type == BDFDB.DiscordConstants.MessageTypes.DEFAULT && (BDFDB.UserUtils.can("SEND_MESSAGES") || e.instance.props.channel.type == BDFDB.DiscordConstants.ChannelTypes.DM || e.instance.props.channel.type == BDFDB.DiscordConstants.ChannelTypes.GROUP_DM)) e.returnvalue.props.children.unshift(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, { if (!e.instance.props.expanded && e.instance.props.message.author.id != BDFDB.UserUtils.me.id && (BDFDB.UserUtils.can("SEND_MESSAGES") || e.instance.props.channel.type == BDFDB.DiscordConstants.ChannelTypes.DM || e.instance.props.channel.type == BDFDB.DiscordConstants.ChannelTypes.GROUP_DM)) e.returnvalue.props.children.unshift(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, {
key: "mention", key: "mention",
text: BDFDB.LanguageUtils.LanguageStrings.MENTION, text: BDFDB.LanguageUtils.LanguageStrings.MENTION,
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, { children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, {
@ -57,7 +57,6 @@ module.exports = (_ => {
}, },
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, { children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, {
className: BDFDB.disCN.messagetoolbaricon, className: BDFDB.disCN.messagetoolbaricon,
nativeClass: true,
name: BDFDB.LibraryComponents.SvgIcon.Names.NOVA_AT name: BDFDB.LibraryComponents.SvgIcon.Names.NOVA_AT
}) })
}) })