Skip to content

Function: shouldNotifyForServerMessage() ​

ts
function shouldNotifyForServerMessage(
   message, 
   userId, 
   server, 
   channel, 
   now?
): boolean;

Defined in: notifications.ts:103

Whether a message in a server channel should raise a popup or a desktop notification for this user.

A message that mentions people only concerns its audience. Otherwise the level decides, and a mute holds everything back, including mentions. Who sent it, muted people and whether the user is already looking are the caller's to check.

Parameters ​

ParameterType
messageMentionFields & Pick<IMessage, "systemType">
userIdnumber
server| IServerNotificationSetting | null | undefined
channel| IChannelNotificationSetting | null | undefined
now?number

Returns ​

boolean

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