Description

Object representing a file message.

Hierarchy

  • default
    • FileMessage

Properties

appleCriticalAlertOptions: null | AppleCriticalAlertOptions = null

The apple critical alert options of the message.

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.

errorCode: number = 0

The error code of them message if the sendingStatus is FAILED.

extendedMessage: object = {}

The template for the message.

extendedMessagePayload?: Record<string, unknown>

The datas for the message.

forms: null | Form[] = null

List of Form that allow users to input their information or opinions

isOperatorMessage: boolean = false

Whether the message was sent from an operator.

mentionType: null | MentionType = null

The mention type. Refer to MentionType.

mentionedMessageTemplate: string

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.

messageId: number

The ID of the message.

messageParams: null | FileMessageCreateParams = null

The messageParams object that used for sending this message For more details.

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

Gets an array of meta arrays sorted by chronological order.

myFeedback: null | Feedback = null

My feedback of the message. Not null, if its FeedbackStatus is FeedbackStatus.SUBMITTED Null, if its FeedbackStatus is FeedbackStatus.NOT_APPLICABLE or FeedbackStatus.NO_FEEDBACK/b>.

myFeedbackStatus: FeedbackStatus = 'NOT_APPLICABLE'

My feedback status of the message.

name: string

Represents the name of the file.

ogMetaData: null | OGMetaData

The OGMetaData of the message. Might be null if

parentMessage: null | BaseMessage = null

The parent message of this message. Only NonNull if this message is a reply message. It does not contain all properties of the parent message.

parentMessageId: number

The parent message's ID if this is a reply message.

plainUrl: string = ''

The plain file URL, which does not contain sendbirdChat.ekey as a parameter. If the file authentication feature is enabled, accessing this plainUrl will be denied.

reactions: Reaction[] = []

The reactions on the message.

replyToChannel: boolean = false

Determines whether the current message is a replied message and also a message was replied to the channel.

reqId: string = ''
requireAuth: boolean = false
scheduledInfo: null | ScheduledInfo = null

The scheduled info of the message if this is a scheduled message

sender: Sender

Sender of the message. This is represented by Sender class.

sendingStatus: SendingStatus

The sending status of the message.

silent: boolean = false

Checks whether the message is silent or not.

size: number

Represents the size of the file.

suggestedReplies: null | string[] = null

The suggested replies of the message.

threadInfo: null | ThreadInfo = null

The thread info of the message.

thumbnails: Thumbnail[] = []

Represents the thumbnail information of image file.

type: string

Represents the type of the file. MIME preferred.

updatedAt: number = 0

The updated time of the message in milliseconds.

Accessors

  • get isResendable(): boolean
  • Whether the message is resendable. Used only if the message is failed/canceled to send.

    Returns boolean

  • get url(): string
  • The file URL. If the file encryption feature is enabled, this will have sendbirdChat.eKey combined with the plainUrl so the file can be accessed. For caching the file, it is recommended to use plainUrl as the key of the file cache.

    Returns string

Methods

  • Parameters

    Returns boolean

    Description

    When parent message is updated, you can update the child message's parent message through this method. If you use MessageCollection, messages in the collection are automatically updated, so don't need to call it.

  • Parameters

    Returns void

    Description

    Applies ReactionEvent to message.

  • Parameters

    Returns boolean

    Description

    Applies ThreadInfoUpdateEvent to a message.

  • Parameters

    • feedbackId: number

    Returns Promise<void>

    Description

    Deletes the feedback for the message. The feedback can be deleted only when the FeedbackStatus is FeedbackStatus.SUBMITTED.

  • Parameters

    Returns Promise<{
        parentMessage: BaseMessage;
        threadedMessages: BaseMessage[];
    }>

    Description

    Retrieves the threaded replies of the current message depending on the timestamp. If the current message doesn’t have replies, the result is an empty list.

  • Returns this is AdminMessage

    Description

    Whether the message has form.

  • Parameters

    • message: default

    Returns boolean

    Description

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

  • Parameters

    • message: default

    Returns boolean

  • Returns Promise<void>

    Description

    Marks the message thread as read.

  • Parameters

    • pushEnabled: boolean

    Returns Promise<void>

    Description

    Sets push notification enabled for the thread.

  • Parameters

    • data: Pick<Feedback, "rating" | "comment">

    Returns Promise<void>

    Description

    Submits the feedback for the message. The feedback can be submitted only when the FeedbackStatus is FeedbackStatus.NO_FEEDBACK.

  • Parameters

    • data: {
          answers?: Record<string, string>;
          formId?: string;
      }
      • Optional answers?: Record<string, string>
      • Optional formId?: string

    Returns Promise<void>

    Deprecated

    since v4.10.6. Use submitForm({ form: Form }) instead.

  • Parameters

    • data: {
          form: Form;
      }

    Returns Promise<void>

    Description

    Submits the form message received from the bot.

  • Parameters

    Returns Promise<void>

    Description

    Updates the feedback for the message. The feedback can be updated only when the FeedbackStatus is FeedbackStatus.SUBMITTED.

Generated using TypeDoc