Options
All
  • Public
  • Public/Protected
  • All
Menu

Basic Message Object

export

Hierarchy

Implements

Index

Constructors

constructor

  • new BaseMessage(receiverId: string, messageType: string, receiverType: string, category: MessageCategory): BaseMessage
  • Parameters

    • receiverId: string
    • messageType: string
    • receiverType: string
    • category: MessageCategory

    Returns BaseMessage

Methods

getCategory

  • getCategory(): MessageCategory
  • Get category of the message.

    Returns MessageCategory

getConversationId

  • getConversationId(): string
  • Get conversation ID of the message.

    Returns string

getDeletedAt

  • getDeletedAt(): number
  • Get timestamp of the message when it was deleted.

    Returns number

getDeletedBy

  • getDeletedBy(): string
  • Get UID of the user who deleted the message.

    Returns string

getDeliveredAt

  • getDeliveredAt(): number
  • Get delivery timestamp of the message.

    Returns number

getDeliveredToMeAt

  • getDeliveredToMeAt(): number
  • Get timestamp of the message at which it was delivered to logged in user.

    Returns number

getEditedAt

  • getEditedAt(): number
  • Get timestamp of the message when it was updated/edited.

    Returns number

getEditedBy

  • getEditedBy(): string
  • Get UID of the user who edited/updated the message.

    Returns string

getId

  • getId(): number
  • Get ID of the message

    Returns number

getMuid

  • getMuid(): string
  • Get MUID of the message.

    Returns string

getParentMessageId

  • getParentMessageId(): number
  • Get parent message ID of the message.

    Returns number

getRawMessage

  • getRawMessage(): Object
  • Get the raw JSON of the message.

    Returns Object

getReadAt

  • getReadAt(): number
  • Get read timestamp of the message.

    Returns number

getReadByMeAt

  • getReadByMeAt(): number
  • Get timestamp of the message at which it was read by the logged in user.

    Returns number

getReceiver

  • Get receiver of the message.

    Returns Group | User

getReceiverId

  • getReceiverId(): string
  • Get receiverID of the message.

    Returns string

getReceiverType

  • getReceiverType(): string
  • Get receiver type of the message.

    Returns string

getReplyCount

  • getReplyCount(): number
  • Get the number of replies of the message.

    Returns number

getSender

  • Get sender of the message.

    Returns User

getSentAt

  • getSentAt(): number
  • Get message's sentAt timestamp.

    Returns number

getType

  • getType(): string
  • Get type of the message.

    Returns string

setCategory

  • setCategory(category: MessageCategory): void
  • Parameters

    • category: MessageCategory

      Set category of the message.

    Returns void

setConversationId

  • setConversationId(value: string): void
  • Parameters

    • value: string

      Set conversation ID of the message.

    Returns void

setDeletedAt

  • setDeletedAt(deletedAt: number): void
  • Parameters

    • deletedAt: number

      Set timestamp of the message when it was deleted.

    Returns void

setDeletedBy

  • setDeletedBy(deletedBy: string): void
  • Parameters

    • deletedBy: string

      Set UID of the user who deleted the message.

    Returns void

setDeliveredAt

  • setDeliveredAt(deliveredAt: number): void
  • Parameters

    • deliveredAt: number

      Set delivery timestamp of the message.

    Returns void

setDeliveredToMeAt

  • setDeliveredToMeAt(deliveredToMeAt: number): void
  • Parameters

    • deliveredToMeAt: number

      Set timestamp of the message at which it was delivered to logged in user.

    Returns void

setEditedAt

  • setEditedAt(editedAt: number): void
  • Parameters

    • editedAt: number

      Set timestamp of the message when it was updated/edited.

    Returns void

setEditedBy

  • setEditedBy(editedBy: string): void
  • Parameters

    • editedBy: string

      Set UID of the user who edited/updated the message.

    Returns void

setId

  • setId(value: number): void
  • Parameters

    • value: number

      Set ID of the message

    Returns void

setMuid

  • setMuid(value: string): void
  • Parameters

    • value: string

      Sets the MUID of the message.

    Returns void

setParentMessageId

  • setParentMessageId(value: number): void
  • Parameters

    • value: number

      Set parent message ID of the message.

    Returns void

setRawMessage

  • setRawMessage(rawMessage: Object): void
  • Parameters

    • rawMessage: Object

      Set the raw JSON of the message.

    Returns void

setReadAt

  • setReadAt(readAt: number): void
  • Parameters

    • readAt: number

      Set read timestamp of the message.

    Returns void

setReadByMeAt

  • setReadByMeAt(readByMeAt: number): void
  • Parameters

    • readByMeAt: number

      Set timestamp of the message at which it was read by the logged in user.

    Returns void

setReceiver

  • Parameters

    • value: Group | User

      Set receiver of the message.

    Returns void

setReceiverId

  • setReceiverId(value: string): void
  • Parameters

    • value: string

      Set receiverId of the message.

    Returns void

setReceiverType

  • setReceiverType(value: string): void
  • Parameters

    • value: string

      Set the receiver type of the message.

    Returns void

setReplyCount

  • setReplyCount(value: number): void
  • Parameters

    • value: number

      Set the number of replies of the message.

    Returns void

setSender

  • setSender(value: User): void
  • Parameters

    • value: User

      Set sender of the message.

    Returns void

setSentAt

  • setSentAt(value: number): void
  • Parameters

    • value: number

      Set message's sentAt timestamp.

    Returns void

setType

  • setType(value: string): void
  • Parameters

    • value: string

      Set type of the message.

    Returns void