fix quick/searchReply & MessageClickactions not working in dms
This commit is contained in:
parent
f32d25b641
commit
608a67c9ae
|
@ -71,7 +71,7 @@ export default definePlugin({
|
||||||
if (!isDeletePressed) {
|
if (!isDeletePressed) {
|
||||||
if (event.detail < 2) return;
|
if (event.detail < 2) return;
|
||||||
if (settings.store.requireModifier && !event.ctrlKey && !event.shiftKey) return;
|
if (settings.store.requireModifier && !event.ctrlKey && !event.shiftKey) return;
|
||||||
if (!PermissionStore.can(PermissionsBits.SEND_MESSAGES, channel)) return;
|
if (channel.guild_id && !PermissionStore.can(PermissionsBits.SEND_MESSAGES, channel)) return;
|
||||||
|
|
||||||
if (isMe) {
|
if (isMe) {
|
||||||
if (!settings.store.enableDoubleClickToEdit || EditStore.isEditing(channel.id, msg.id)) return;
|
if (!settings.store.enableDoubleClickToEdit || EditStore.isEditing(channel.id, msg.id)) return;
|
||||||
|
|
|
@ -172,7 +172,8 @@ function shouldMention(message) {
|
||||||
|
|
||||||
// handle next/prev reply
|
// handle next/prev reply
|
||||||
function nextReply(isUp: boolean) {
|
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);
|
const message = getNextMessage(isUp, true);
|
||||||
|
|
||||||
if (!message)
|
if (!message)
|
||||||
|
@ -196,7 +197,8 @@ function nextReply(isUp: boolean) {
|
||||||
|
|
||||||
// handle next/prev edit
|
// handle next/prev edit
|
||||||
function nextEdit(isUp: boolean) {
|
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);
|
const message = getNextMessage(isUp, false);
|
||||||
|
|
||||||
if (!message)
|
if (!message)
|
||||||
|
|
|
@ -32,7 +32,7 @@ const messageContextMenuPatch: NavContextMenuPatchCallback = (children, { messag
|
||||||
if (SelectedChannelStore.getChannelId() !== message.channel_id) return;
|
if (SelectedChannelStore.getChannelId() !== message.channel_id) return;
|
||||||
const channel = ChannelStore.getChannel(message?.channel_id);
|
const channel = ChannelStore.getChannel(message?.channel_id);
|
||||||
if (!channel) return;
|
if (!channel) return;
|
||||||
if (!PermissionStore.can(PermissionsBits.SEND_MESSAGES, channel)) return;
|
if (channel.guild_id && !PermissionStore.can(PermissionsBits.SEND_MESSAGES, channel)) return;
|
||||||
|
|
||||||
// dms and group chats
|
// dms and group chats
|
||||||
const dmGroup = findGroupChildrenByChildId("pin", children);
|
const dmGroup = findGroupChildrenByChildId("pin", children);
|
||||||
|
|
Loading…
Reference in a new issue