attempt_direct_delivery

Function attempt_direct_delivery 

Source
async fn attempt_direct_delivery(
    destination: &str,
    message: &Message,
    context: &CommandContext,
) -> Result<bool>
Expand description

Attempts to directly deliver a message to the recipient.

If the recipient is online and connected, the message is sent directly and removed from the outbox. Otherwise, it logs a message and returns false.

§Arguments

  • destination - The display name or PeerId of the recipient.
  • message - The message to send.
  • context - The CommandContext for network interaction and chat output.

§Returns

true if direct delivery was successful, false otherwise.

§Errors

This function returns an error if removing the message from the outbox fails.