fix quick/searchReply & MessageClickactions not working in dms

This commit is contained in:
V 2023-09-26 03:54:59 +02:00
parent f32d25b641
commit 608a67c9ae
No known key found for this signature in database
GPG key ID: A1DC0CFB5615D905
3 changed files with 6 additions and 4 deletions

View file

@ -172,7 +172,8 @@ function shouldMention(message) {
// handle next/prev reply
function nextReply(isUp: boolean) {
if (!PermissionStore.can(PermissionsBits.SEND_MESSAGES, ChannelStore.getChannel(SelectedChannelStore.getChannelId()))) return;
const currChannel = ChannelStore.getChannel(SelectedChannelStore.getChannelId());
if (currChannel.guild_id && !PermissionStore.can(PermissionsBits.SEND_MESSAGES, currChannel)) return;
const message = getNextMessage(isUp, true);
if (!message)
@ -196,7 +197,8 @@ function nextReply(isUp: boolean) {
// handle next/prev edit
function nextEdit(isUp: boolean) {
if (!PermissionStore.can(PermissionsBits.SEND_MESSAGES, ChannelStore.getChannel(SelectedChannelStore.getChannelId()))) return;
const currChannel = ChannelStore.getChannel(SelectedChannelStore.getChannelId());
if (currChannel.guild_id && !PermissionStore.can(PermissionsBits.SEND_MESSAGES, currChannel)) return;
const message = getNextMessage(isUp, false);
if (!message)