Static utilities related to messages.

Hierarchy

  • MessageStatic

Properties

fromEncoded: ((JsonObject: any, channelOptions?: ChannelOptions) => Message)

Type declaration

    • (JsonObject: any, channelOptions?: ChannelOptions): Message
    • A static factory method to create a Message object from a deserialized Message-like object encoded using Ably's wire protocol.

      Returns

      A Message object.

      Parameters

      • JsonObject: any

        A Message-like deserialized object.

      • Optional channelOptions: ChannelOptions

        A ChannelOptions object. If you have an encrypted channel, use this to allow the library to decrypt the data.

      Returns Message

fromEncodedArray: ((JsonArray: any[], channelOptions?: ChannelOptions) => Message[])

Type declaration

    • (JsonArray: any[], channelOptions?: ChannelOptions): Message[]
    • A static factory method to create an array of Message objects from an array of deserialized Message-like object encoded using Ably's wire protocol.

      Returns

      An array of Message objects.

      Parameters

      • JsonArray: any[]

        An array of Message-like deserialized objects.

      • Optional channelOptions: ChannelOptions

        A ChannelOptions object. If you have an encrypted channel, use this to allow the library to decrypt the data.

      Returns Message[]

Generated using TypeDoc