Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "scripts/messageHandler"

Index

Functions

Const addChannelHandler

  • addChannelHandler(id: any, cb: any): void
  • deprecated

    since version 1.18.0

    Parameters

    • id: any
    • cb: any

    Returns void

Const addMessageListener

  • addMessageListener(arg: { roomId: string }, callback: Function): void
  • Adds a listener to a chatroom that calls passed callback function when event fires.

    since

    1.18.0

    example
    addMessageHandler({roomId: 'c1f6082c-f7b9-4d1e-b64e-9071a3860ffc'}, function(e){console.log(e)})

    Parameters

    • arg: { roomId: string }
      • roomId: string

        Room id of chatroom to add listener to.

    • callback: Function

    Returns void

Const removeChannelHandler

  • removeChannelHandler(id: any, cb: any): void
  • deprecated

    since version 1.18.0

    Parameters

    • id: any
    • cb: any

    Returns void

Const removeMessageListener

  • removeMessageListener(arg: { roomId: string }, callback: Function): void
  • Removes listener from chatroom

    since

    1.18.0

    example
    removeMessageHandler({roomId: 'c1f6082c-f7b9-4d1e-b64e-9071a3860ffc'}, function(e){console.log(e)})

    Parameters

    • arg: { roomId: string }
      • roomId: string

        Room id of chatroom to remove listener from.

    • callback: Function

    Returns void

Generated using TypeDoc