@sudoplatform/sudo-secure-communications
    Preparing search index...

    Class DefaultMessagingModule

    Messaging management for the Secure Communications Service.

    Each method on this interface takes an input which includes a Recipient parameter representing a "Chat" with either a Direct Chat, Channel or Group.

    Implements

    Index

    Constructors

    • Parameters

      • sessionManager: SessionManager
      • mediaCredentialManager: MediaCredentialManager
      • secureCommsServiceConfig: {
            advancedSearchEnabled: boolean;
            homeServer: string;
            publicMediaBucket: string;
            region: string;
            roomMediaBucket: string;
            serviceEndpointUrl: string;
        }

      Returns DefaultMessagingModule

    Methods

    • Deletes an existing message that has been sent to a recipient. The original message is removed for all members of the chat.

      Parameters

      Returns Promise<void>

    • Edits the caption for an existing media attachment that has been sent to a recipient. The original message is replaced by the edited message for all members of the chat.

      Parameters

      Returns Promise<void>

    • Edits an existing message that has been sent to a recipient. The original message is replaced by the edited message for all members of the chat.

      Parameters

      Returns Promise<void>

    • Edits an existing poll.

      Parameters

      Returns Promise<void>

    • Ends a poll.

      Parameters

      Returns Promise<void>

    • Retrieve an individual message for a given recipient by the message's identifier.

      Parameters

      Returns Promise<Message | undefined>

      The message matching the input identifier, or undefined if not found.

    • Retrieve a list of messages for a given recipient, ordered from newest message to oldest.

      Parameters

      Returns Promise<ListOutput<Message>>

      A list of message items and a next token to support pagination.

    • Marks the chat with a recipient as read.

      Parameters

      Returns Promise<void>

    • Pins an existing message for a given recipient.

      Parameters

      Returns Promise<void>

    • Uploads and sends a media message to a recipient. Supported media types are images, videos, audio, and files.

      Parameters

      Returns Promise<void>

    • Sends a message to a recipient.

      Parameters

      • input: SendMessageInput

        Parameters used to send a message including any other associated metadata.

      Returns Promise<void>

    • Toggles a reaction for an existing message. All members of the chat will have visibility of the reaction.

      Parameters

      Returns Promise<void>