Fix QuickMention not working in DMs (#2028)

Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
fres621 2023-12-06 21:54:23 +00:00 committed by GitHub
parent 9a89f7b3b2
commit 613b2dc5f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,7 +31,7 @@ export default definePlugin({
start() { start() {
addButton("QuickMention", msg => { addButton("QuickMention", msg => {
const channel = ChannelStore.getChannel(msg.channel_id); const channel = ChannelStore.getChannel(msg.channel_id);
if (!PermissionStore.can(PermissionsBits.SEND_MESSAGES, channel)) return null; if (channel.guild_id && !PermissionStore.can(PermissionsBits.SEND_MESSAGES, channel)) return null;
return { return {
label: "Quick Mention", label: "Quick Mention",