MessageClickActions: Ignore Ephemeral & Deleted Messages (#1972)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
parent
9faa1331da
commit
e4942397dc
1 changed files with 4 additions and 0 deletions
|
@ -72,6 +72,7 @@ export default definePlugin({
|
||||||
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 (channel.guild_id && !PermissionStore.can(PermissionsBits.SEND_MESSAGES, channel)) return;
|
if (channel.guild_id && !PermissionStore.can(PermissionsBits.SEND_MESSAGES, channel)) return;
|
||||||
|
if (msg.deleted === true) 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;
|
||||||
|
@ -81,6 +82,9 @@ export default definePlugin({
|
||||||
} else {
|
} else {
|
||||||
if (!settings.store.enableDoubleClickToReply) return;
|
if (!settings.store.enableDoubleClickToReply) return;
|
||||||
|
|
||||||
|
const EPHEMERAL = 64;
|
||||||
|
if (msg.hasFlag(EPHEMERAL)) return;
|
||||||
|
|
||||||
FluxDispatcher.dispatch({
|
FluxDispatcher.dispatch({
|
||||||
type: "CREATE_PENDING_REPLY",
|
type: "CREATE_PENDING_REPLY",
|
||||||
channel,
|
channel,
|
||||||
|
|
Loading…
Reference in a new issue