Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SpectrumTextMessage

Hierarchy

  • SpectrumTextMessage

Index

Constructors

constructor

Properties

Protected _message

_message: TextMessage

Protected _reactionListener

_reactionListener: any

Private broadcaster

broadcaster: Broadcaster = Broadcaster.getInstance()

instance of RSI Spectrum ws

Static Protected _emojis

_emojis: string = ""

Methods

getMessage

getPlainText

  • getPlainText(): string

onDelete

  • onDelete(): void

onEdit

  • onEdit(): void

onReaction

  • onReaction(callback: any): void

removeOnReaction

  • removeOnReaction(): void

Static fetchEmbedMediaId

  • fetchEmbedMediaId(url: string): Promise<string>

Static findEmojiInText

Static findMentionsInText

  • findMentionsInText(text: any, curEntity: any): curEntities

Static generateContentStateFromText

  • generateContentStateFromText(textObj: object, delimiter?: string, disableEmojis?: boolean, disableMentions?: boolean): object
  • Parameters

    • textObj: object
      • text: string
    • Optional delimiter: string
    • Default value disableEmojis: boolean = false
    • Default value disableMentions: boolean = false

    Returns object

    • blocks: any[]
    • entityMap: any

Static Private reorganizeEntities

  • Called after we've parsed every different entitities for rich text in order to sort them. Apparently, the spectrum back end doesn't like when the entities aren't in the same order they are in text, and that causes a weird bug where the text will duplicate.

    This fixes this.

    todo

    report this.

    Parameters

    Returns curEntities

Generated using TypeDoc