Skip to content

IReceivedMessageHandler

Namespace: Signal.Bot

Full Name: Signal.Bot.IReceivedMessageHandler

Summary

Defines the contract for handling incoming Signal messages and errors during polling operations.

Methods

HandleAsync

csharp
HandleAsync(client, messageEnvelope, cancellationToken)

Handles an incoming Signal message received from the polling mechanism.

Parameters:

  • client - The ISignalBotClient instance that received the message.
  • messageEnvelope - The ReceivedMessageEnvelope containing the message data and metadata.
  • cancellationToken - A CancellationToken to observe for cancellation requests.

Returns: A Task representing the asynchronous operation.

HandleErrorAsync

csharp
HandleErrorAsync(client, error, cancellationToken)

Handles errors that occur during message polling or processing.

Parameters:

  • client - The ISignalBotClient instance where the error occurred.
  • error - The Error containing details about the error that occurred.
  • cancellationToken - A CancellationToken to observe for cancellation requests.

Returns: A Task representing the asynchronous error handling operation.