add_friend

Function add_friend 

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

Adds a new friend to the application’s friend list.

This command requires the friend’s Peer ID, their E2E public key, and optionally a nickname.

Usage: friend <peer_id> <e2e_key> [nickname]

§Arguments

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

§Errors

This function returns an error if adding the friend to storage fails.