handle_send

Function handle_send 

Source
pub async fn handle_send(parts: &[&str], context: &CommandContext) -> Result<()>
Expand description

Handles the ‘send’ command, encrypting and sending a message to a friend.

This function attempts direct delivery first. If direct delivery fails, it then attempts to store the message in available mailboxes.

Usage: send <peer_id_or_nickname> <message...>

§Arguments

  • parts - A slice of strings representing the command arguments.
  • context - The CommandContext providing access to the application’s state and network.

§Errors

This function returns an error if friend lookup, encryption, or message storage fails.