mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-07 19:22:14 +09:00
fix(mentions): ignore @everyone and @here in one-to-one DMs (#3199)
This commit is contained in:
@@ -26,7 +26,7 @@ export function createSpecialMentionPayload(kind: SpecialMentionKind): ComposerI
|
||||
}
|
||||
|
||||
export function areSpecialMentionsAllowed(
|
||||
channel: Pick<Channel, 'guildId' | 'isPersonalNotes'> | null,
|
||||
channel: Pick<Channel, 'guildId' | 'isGroupDM'> | null,
|
||||
allowSpecialMentions: boolean | undefined,
|
||||
allowedTriggers: ReadonlyArray<TriggerType> | undefined,
|
||||
canMentionEveryone: boolean,
|
||||
@@ -34,7 +34,7 @@ export function areSpecialMentionsAllowed(
|
||||
if (channel == null || allowSpecialMentions === false || !isAutocompleteTriggerAllowed('mention', allowedTriggers)) {
|
||||
return false;
|
||||
}
|
||||
return channel.guildId == null ? !channel.isPersonalNotes() : canMentionEveryone;
|
||||
return channel.guildId == null ? channel.isGroupDM() : canMentionEveryone;
|
||||
}
|
||||
|
||||
export function hasOpenCodeFence(text: string): boolean {
|
||||
|
||||
@@ -17,7 +17,7 @@ export function isMentioned(user: User, message: Message): boolean {
|
||||
return false;
|
||||
}
|
||||
const suppressEveryone = UserGuildSettings.isEveryoneMentionSuppressed(channel.guildId ?? null);
|
||||
const mentionEveryone = message.mentionEveryone && !suppressEveryone;
|
||||
const mentionEveryone = message.mentionEveryone && !channel.isDM() && !suppressEveryone;
|
||||
if (mentionEveryone) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user