Object representing a notification message.

Hierarchy

  • default
    • NotificationMessage

Properties

channelType: ChannelType = ChannelType.BASE

The ChannelType of the channel this message belongs to.

channelUrl: string

The channel URL of the channel this message belongs to.

createdAt: number = 0

The creation time of the message in milliseconds.

customType: string

The custom type of the message.

data: string

The custom type of the message.

extendedMessage: object = {}

The template for the message.

extendedMessagePayload?: Record<string, unknown>

The datas for the message.

mentionedMessageTemplate: undefined | string = undefined

The mentioned message template of the message.

mentionedUserIds: null | string[] = null

The mentioned user ids of the message.

mentionedUsers: null | User[] = null

The mentioned users of the message.

mentionType: null | MentionType = null

The mention type. Refer to MentionType.

The message status of the notification message. This message status will be changed only if the channel is a FeedChannel.

messageType: MessageType = MessageType.BASE
metaArrays: MessageMetaArray[] = []

Gets an array of meta arrays sorted by chronological order.

notificationData: null | NotificationData = null

Notification data.

notificationId: string

The ID of the notification message.

priority: NotificationPriority

Notification priority. This value can be set when the notification message is sent and default value is NotificationPriority.NORMAL.

updatedAt: number = 0

The updated time of the message in milliseconds.

Methods

  • Parameters

    • message: MessagePrototype

    Returns boolean

    Whether the given message is equal in all the values of this message.

  • Parameters

    Returns boolean

    Whether the given message is identical to this message.

  • Returns object

    Serializes a UserMessage, FileMessage or AdminMessage instance. The instance can be restored by MessageModule.buildMessageFromSerializedData.