Interface RestAnnotations

Functionality for annotating messages with small pieces of data, such as emoji reactions, that the server will roll up into the message as a summary.

Hierarchy

  • RestAnnotations

Methods

Methods

  • Publish an annotation removal request for a message, to remove it from the summary summaries. The semantics of the delete (and what fields are required) are different for each annotation type; see annotation types documentation for more details.

    Parameters

    • message: Message

      The message which has an annotation that you want to delete.

    • annotation: OutboundAnnotation

      The annotation deletion request. (Must include at least the type, other required fields depend on the type).

    Returns Promise<void>

  • Publish an annotation removal request for a message, to remove it from the summary summaries. The semantics of the delete (and what fields are required) are different for each annotation type; see annotation types documentation for more details.

    Parameters

    • messageSerial: string

      The serial field of the message which has an annotation that you want to delete.

    • annotation: OutboundAnnotation

      The annotation deletion request. (Must include at least the type, other required fields depend on the type).

    Returns Promise<void>

  • Publish a new annotation for a message.

    Parameters

    • message: Message

      The message to annotate.

    • annotation: OutboundAnnotation

      The annotation to publish. (Must include at least the type. Assumed to be an annotation.create if no action is specified)

    Returns Promise<void>

  • Publish a new annotation for a message (alternative form where you only have the serial of the message, not a complete Message object)

    Parameters

    • messageSerial: string

      The serial field of the message to annotate.

    • annotation: OutboundAnnotation

      The annotation to publish. (Must include at least the type. Assumed to be an annotation.create if no action is specified)

    Returns Promise<void>

Generated using TypeDoc