UserMessage

UserMessage

Class representing a user message

Constructor

new UserMessage(jsonObjectopt)

Parameters:
Name Type Attributes Description
jsonObject object <optional>

Extends

Members

(nullable) _messageParams :module:model/params/userMessageParams~UserMessageParams

Default Value:
  • null

MessageParams used in sending this message.

Type:

(nullable) appleCriticalAlertOptions :module:model/appleCriticalAlertOptions~AppleCriticalAlertOptions

Overrides:
Default Value:
  • null

Push notification options for Apple critical alert.

Type:
  • module:model/appleCriticalAlertOptions~AppleCriticalAlertOptions

(nullable) channelType :string

Overrides:
Default Value:
  • null

One of "group", "open", "base"

Type:
  • string

channelUrl :string

Overrides:
Type:
  • string

createdAt :number

Overrides:
Default Value:
  • 0
Type:
  • number

(nullable) customType :string

Overrides:
Default Value:
  • null
Type:
  • string

(nullable) data :string

Overrides:
Default Value:
  • null
Type:
  • string

errorCode :number

Default Value:
  • 0
Type:
  • number

isOperatorMessage :boolean

Overrides:
Default Value:
  • false
Type:
  • boolean

isReplyToChannel :boolean

Overrides:
Default Value:
  • false
Type:
  • boolean

(nullable) mentionedMessageTemplate :string

Overrides:
Default Value:
  • null
Type:
  • string

mentionedUserIds :Array.<string>

Overrides:
Default Value:
  • []
Type:
  • Array.<string>

mentionedUsers :Array.<module:model/user~User>

Overrides:
Default Value:
  • []
Type:
  • Array.<module:model/user~User>

(nullable) mentionType :string

Overrides:
Default Value:
  • null

One of "users", "channel"

Type:
  • string

(nullable) message :string

Default Value:
  • null
Type:
  • string

messageId :number

Overrides:
Default Value:
  • 0

Unique identifier of a message

Type:
  • number

messageParams

messageSurvivalSeconds :number

Default Value:
  • -1
Type:
  • number

metaArray :Object

Overrides:
Deprecated:
  • Yes
Default Value:
  • {}
Type:
  • Object

metaArrays :Array.<module:model/messageMetaArray~MessageMetaArray>

Overrides:
Default Value:
  • []

Array of MessageArray objects

Type:
  • Array.<module:model/messageMetaArray~MessageMetaArray>

(nullable) ogMetaData :module:model/ogMetaData~OGMetaData

Overrides:
Default Value:
  • null

OpenGraph Metadata object

Type:
  • module:model/ogMetaData~OGMetaData

parentMessage :module:model/userMessage~UserMessage|module:model/fileMessage~FileMessage|module:model/adminMessage~AdminMessage

Overrides:
Default Value:
  • null
Type:

parentMessageId :number

Overrides:
Default Value:
  • 0

Unique identifier of a parent message

Type:
  • number

(nullable) parentMessageText :string

Overrides:
Deprecated:
  • since version v3.0.159, please use parentMessage instead
Default Value:
  • null
Type:
  • string

plugins :Array.<module:model/plugin~Plugin>

Default Value:
  • []
Type:
  • Array.<module:model/plugin~Plugin>

poll :module:model/poll~Plll

Default Value:
  • null
Type:
  • module:model/poll~Plll

reactions :Array.<module:model/reaction~Reaction>

Overrides:
Default Value:
  • []

Array of Reaction objects

Type:
  • Array.<module:model/reaction~Reaction>

reqId :string

Overrides:
Default Value:
  • ""
Type:
  • string

requestedMentionUserIds :Array.<string>

Default Value:
  • []
Type:
  • Array.<string>

(nullable) requestState :string

Deprecated:
  • since version v3.0.119, please use BaseMessageInstance.sendingStatus instead
Default Value:
  • null

One of "none" | "pending" | "failed" | "succeeded"

Type:
  • string

sender :module:model/user~User

Default Value:
  • null
Type:
  • module:model/user~User

(nullable) sendingStatus :string

Overrides:
Default Value:
  • null

One of "none" | "pending" | "canceled" | "failed" | "succeeded"

Type:
  • string

silent :boolean

Overrides:
Default Value:
  • false
Type:
  • boolean

(nullable) threadInfo :module:model/threadInfo~ThreadInfo

Overrides:
Default Value:
  • null

thread info object

Type:
  • module:model/threadInfo~ThreadInfo

translations :Object

Default Value:
  • {}
Type:
  • Object

updatedAt :number

Overrides:
Default Value:
  • 0
Type:
  • number

Methods

(static) buildFromSerializedData(serializedData) → {module:model/userMessage~UserMessage}

Parameters:
Name Type Description
serializedData Object
Returns:
Type
module:model/userMessage~UserMessage

applyParentMessage(updatedParentMessage) → {boolean}

Overrides:
Parameters:
Name Type Description
updatedParentMessage module:model/userMessage~UserMessage | module:model/fileMessage~FileMessage | module:model/adminMessage~AdminMessage
Returns:
Type
boolean

applyPollUpdateEvent(event) → {boolean}

Parameters:
Name Type Description
event module:model/event/pollUpdateEvent~PollUpdateEvent
Returns:
Type
boolean

applyPollVoteEvent(event) → {boolean}

Parameters:
Name Type Description
event module:model/event/pollVoteEvent~PollVoteEvent
Returns:
Type
boolean

applyReactionEvent(event)

Overrides:
Parameters:
Name Type Description
event module:model/reactionEvent~ReactionEvent

applyThreadInfoUpdateEvent(threadInfoUpdateEvent) → {boolean}

Overrides:
Parameters:
Name Type Description
threadInfoUpdateEvent module:model/event/threadInfoUpdateEvent~ThreadInfoUpdateEvent
Returns:
Type
boolean

getMetaArrayByKeys(keys) → {Object}

Overrides:
Deprecated:
  • Yes
Parameters:
Name Type Description
keys Array.<string>
Returns:
Type
Object

getMetaArraysByKeys(keys) → {Array.<module:model/messageMetaArray~MessageMetaArray>}

Overrides:
Parameters:
Name Type Description
keys Array.<string>
Returns:
Type
Array.<module:model/messageMetaArray~MessageMetaArray>

getThreadedMessagesByTimestamp(timestamp, params, callbackopt, nullable) → {Promise|undefined}

Overrides:
Parameters:
Name Type Attributes Description
timestamp number
params module:model/params/threadedMessageListParams~ThreadedMessageListParams
callback messageListCallback <optional>
<nullable>
Returns:
Type
Promise | undefined

isAdminMessage() → {boolean}

Overrides:
Returns:
Type
boolean

isEqual(message) → {boolean}

Overrides:

Checks deep equality

Parameters:
Name Type Description
message module:model/baseMessage~BaseMessage
Returns:
Type
boolean

isFileMessage() → {boolean}

Overrides:
Returns:
Type
boolean

isGroupChannel() → {boolean}

Overrides:
Returns:
Type
boolean

isIdentical(message) → {boolean}

Overrides:
Parameters:
Name Type Description
message module:model/baseMessage~BaseMessage
Returns:
Type
boolean

isOpenChannel() → {boolean}

Overrides:
Returns:
Type
boolean

isResendable() → {boolean}

Specifies if the message is possible to resend.

Returns:
Type
boolean

isUserMessage() → {boolean}

Overrides:
Returns:
Type
boolean

serialize() → {Object}

Overrides:
Returns:
Type
Object