Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Message

Wrapper around dc_msg_t*

Hierarchy

  • Message

Index

Constructors

constructor

Properties

dc_msg

Accessors

downloadState

hasHTML

  • get hasHTML(): boolean

overrideSenderName

  • get overrideSenderName(): string

subject

  • get subject(): string

Methods

getChatId

  • getChatId(): number

getDuration

  • getDuration(): number

getFile

  • getFile(): string

getFilebytes

  • getFilebytes(): number

getFilemime

  • getFilemime(): string

getFilename

  • getFilename(): string

getFromId

  • getFromId(): number

getHeight

  • getHeight(): number

getId

  • getId(): number

getQuotedMessage

  • getQuotedMessage(): Message | null

getQuotedText

  • getQuotedText(): string

getReceivedTimestamp

  • getReceivedTimestamp(): number

getSetupcodebegin

  • getSetupcodebegin(): any

getShowpadlock

  • getShowpadlock(): boolean

getSortTimestamp

  • getSortTimestamp(): number

getState

getSummary

getSummarytext

  • getSummarytext(approxCharacters: number): string

getText

  • getText(): string

getTimestamp

  • getTimestamp(): number

getVideochatType

  • getVideochatType(): number

getVideochatUrl

  • getVideochatUrl(): string

getViewType

getWidth

  • getWidth(): number

hasDeviatingTimestamp

  • hasDeviatingTimestamp(): any

hasLocation

  • hasLocation(): boolean

isDeadDrop

  • isDeadDrop(): boolean

isForwarded

  • isForwarded(): boolean

isIncreation

  • isIncreation(): boolean

isInfo

  • isInfo(): boolean

isSent

  • isSent(): boolean

isSetupmessage

  • isSetupmessage(): boolean

latefilingMediasize

  • latefilingMediasize(width: number, height: number, duration: number): void
  • Parameters

    • width: number
    • height: number
    • duration: number

    Returns void

setDimension

  • setDimension(width: number, height: number): this

setDuration

  • setDuration(duration: number): this

setFile

  • setFile(file: string, mime?: undefined | string): this
  • Parameters

    • file: string
    • Optional mime: undefined | string

    Returns this

setHTML

  • setHTML(html: string): this

setLocation

  • setLocation(longitude: number, latitude: number): this
  • Parameters

    • longitude: number
    • latitude: number

    Returns this

setOverrideSenderName

  • setOverrideSenderName(senderName: string): this

setQuote

  • setQuote(quotedMessage: Message): this

setText

  • setText(text: string): this

toJson

  • toJson(): { chatId: number; downloadState: MessageDownloadState; duration: number; file: string; fromId: number; hasDeviatingTimestamp: any; hasHTML: boolean; hasLocation: boolean; id: number; isForwarded: boolean; isInfo: boolean; isSetupmessage: boolean; overrideSenderName: string; quotedMessageId: null | number; quotedText: string; receivedTimestamp: number; showPadlock: boolean; sortTimestamp: number; state: any; subject: string; summary: { state: number; text1: string; text1Meaning: string; text2: string; timestamp: number }; text: string; timestamp: number; videochatType: number; videochatUrl: string; viewType: any; dimensions: object }
  • Returns { chatId: number; downloadState: MessageDownloadState; duration: number; file: string; fromId: number; hasDeviatingTimestamp: any; hasHTML: boolean; hasLocation: boolean; id: number; isForwarded: boolean; isInfo: boolean; isSetupmessage: boolean; overrideSenderName: string; quotedMessageId: null | number; quotedText: string; receivedTimestamp: number; showPadlock: boolean; sortTimestamp: number; state: any; subject: string; summary: { state: number; text1: string; text1Meaning: string; text2: string; timestamp: number }; text: string; timestamp: number; videochatType: number; videochatUrl: string; viewType: any; dimensions: object }

    • chatId: number
    • downloadState: MessageDownloadState
    • duration: number
    • file: string
    • fromId: number
    • hasDeviatingTimestamp: any
    • hasHTML: boolean
    • hasLocation: boolean
    • id: number
    • isForwarded: boolean
    • isInfo: boolean
    • isSetupmessage: boolean
    • overrideSenderName: string
    • quotedMessageId: null | number
    • quotedText: string
    • receivedTimestamp: number
    • showPadlock: boolean
    • sortTimestamp: number
    • state: any
    • subject: string
    • summary: { state: number; text1: string; text1Meaning: string; text2: string; timestamp: number }
      • state: number
      • text1: string
      • text1Meaning: string
      • text2: string
      • timestamp: number
    • text: string
    • timestamp: number
    • videochatType: number
    • videochatUrl: string
    • viewType: any
    • dimensions: object
      • height: number
      • width: number

Generated using TypeDoc