Skip to content

Function: isMentionFor() ​

ts
function isMentionFor(
   message, 
   userId, 
   settings?
): boolean;

Defined in: notifications.ts:62

Whether a message counts as mentioning this user, once their server's settings have had their say.

Being named always counts. Being reached through a role or through @everyone/@channel counts unless that kind is suppressed. A message sent before the reasons were recorded counts for everyone in its audience, which is how it was counted when it arrived.

Parameters ​

ParameterType
messageMentionFields
userIdnumber
settings?| Partial<SuppressionSettings> | null

Returns ​

boolean

Released under the GNU Affero General Public License v3.0.