feat: rename chat-cli's /intro command to /account

This commit is contained in:
Mojtaba Chenani
2026-08-12 23:03:43 +02:00
parent 2fc6172471
commit 130a2d080c
4 changed files with 15 additions and 15 deletions
+4 -4
View File
@@ -54,8 +54,8 @@ cargo run -p chat-cli -- --name bob --transport file
### Establishing a connection
1. In Alice's terminal, type `/intro`the bundle is copied to your clipboard automatically.
2. In Bob's terminal, type `/connect <paste bundle here>`.
1. In Alice's terminal, type `/account` — her address is copied to the clipboard automatically.
2. In Bob's terminal, type `/connect <paste address here>`.
3. Bob's "Hello!" message appears in Alice's terminal. Both can now chat.
### Optional: KeyPackage registry
@@ -97,8 +97,8 @@ The registry is a throwaway testnet helper; v0.3 replaces it with a
| Command | Description |
|---------|-------------|
| `/help` | Show available commands |
| `/intro` | Generate your introduction bundle (copies to clipboard) |
| `/connect <bundle>` | Connect to a user using their introduction bundle |
| `/account` | Show your account address (copies to clipboard) |
| `/connect <address>` | Connect to a user using their address |
| `/chats` | List all established chats |
| `/switch <user>` | Switch active chat |
| `/delete <user>` | Delete a chat session |
+6 -6
View File
@@ -241,7 +241,7 @@ where
match command {
"/help" => {
self.add_system_message("── Commands ──");
self.add_system_message("/intro - Show your address");
self.add_system_message("/account - Show your account address");
self.add_system_message("/connect <address> - Connect using an address");
self.add_system_message("/nickname <name> - Name the active chat");
self.add_system_message("/chats - List all chats");
@@ -252,17 +252,17 @@ where
self.add_system_message("/quit or Esc or Ctrl+C - Exit");
Ok(Some("Help displayed".to_string()))
}
"/intro" => {
"/account" => {
let address = self.client.addr().to_string();
self.add_system_message("── Your Address ──");
self.add_system_message("── Your Account Address ──");
self.add_system_message(&address);
let clipboard_msg = match Clipboard::new().and_then(|mut cb| cb.set_text(&address))
{
Ok(()) => "Address copied to clipboard! Share it, then /connect their address.",
Err(_) => "Share this address with others to connect!",
Ok(()) => "Address copied to clipboard. Share it so others can reach you.",
Err(_) => "Share this address so others can reach you.",
};
self.add_system_message(clipboard_msg);
Ok(Some("Address shown".to_string()))
Ok(Some("Account address shown".to_string()))
}
"/connect" => {
if args.is_empty() {
@@ -191,7 +191,7 @@ impl GroupV1Convo {
self.send_payload(cx, msg_bytes)
}
// Publish outboubound payloads to the DeliveryService
// Publish outbound payloads to the DeliveryService
fn send_payload<S: ExternalServices>(
&mut self,
cx: &mut ServiceContext<S>,
@@ -329,7 +329,7 @@ impl<S: ExternalServices> GroupConvo<S> for GroupV1Convo {
members: &[IdentIdRef],
) -> Result<(), ChatError> {
if members.len() > 50 {
// This is a temporary limit that originates from the the De-MLS epoch time.
// This is a temporary limit that originates from the De-MLS epoch time.
return Err(ChatError::Protocol(
"Cannot add more than 50 Members at a time".into(),
));
+3 -3
View File
@@ -11,8 +11,8 @@ use crate::IdentityProvider;
/// A Wrapper for an IdentityProvider which provides MLS specific functionality
///
/// This type stops OpenMLS internal from leaking outside of the crate.
/// Developers provider a simple IdentitityProvider, and Signer and Credential generation
/// This type stops OpenMLS internal from leaking outside the crate.
/// Developers provider a simple IdentityProvider, and Signer and Credential generation
/// is provided
pub struct MlsIdentityProvider<T: IdentityProvider>(T);
@@ -55,7 +55,7 @@ impl<T: IdentityProvider> IdentityProvider for MlsIdentityProvider<T> {
}
}
// Implement Signer directly for MlsIdentityProvider, so that openmls Signer contstraint
// Implement Signer directly for MlsIdentityProvider, so that openmls Signer constraint
// does not leave the module.
impl<T: IdentityProvider> Signer for MlsIdentityProvider<T> {
fn sign(&self, payload: &[u8]) -> Result<Vec<u8>, SignerError> {