Update about a new or edited business message.

Hierarchy (view full)

Constructors

Properties

_peers: PeersIndex
isScheduled: boolean = false

Whether the message is scheduled. If it is, then its date is set to future.

Raw TL object.

Accessors

  • get forwards(): null | number
  • For channel posts, number of forwards

    null for service messages and non-post messages, or if the current user is not an admin in the channel

    Returns null | number

  • get isForwardedPremiumMedia(): boolean
  • Whether this is a premium media (e.g. >2gb file or fullscreen sticker) that was forwarded without author by a non-premium user

    Returns boolean

  • get isOutgoing(): boolean
  • Whether the message is incoming or outgoing:

    • Messages received from other chats are incoming (outgoing = false)
    • Messages sent by you to other chats are outgoing (outgoing = true)
    • Messages to yourself (i.e. Saved Messages) are incoming (outgoing = false)

    Returns boolean

  • get quickReplyShortcutId(): null | number
  • If non-null, this message is not actually sent, and is instead inside a group of "quick reply" messages under the given shortcut ID

    Returns null | number

  • get sender(): Peer
  • Message sender.

    Usually is a User, but can be a Chat in case the message was sent by an anonymous admin, anonymous premium user, or if the message is a forwarded channel post.

    If the message was sent by an anonymous admin, sender will equal to chat.

    If the message is a forwarded channel post, sender is the channel itself.

    Returns Peer