From 53597bc50191b0c56e1cc23e1dc74b9c6b69b37b Mon Sep 17 00:00:00 2001 From: Jazz Turner-Baggs <473256+jazzz@users.noreply.github.com> Date: Wed, 18 Feb 2026 10:00:28 -0800 Subject: [PATCH] Update Context to accept a name --- conversations/src/context.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/conversations/src/context.rs b/conversations/src/context.rs index 3e16386..4ca0bc0 100644 --- a/conversations/src/context.rs +++ b/conversations/src/context.rs @@ -22,7 +22,7 @@ pub struct Context { impl Context { pub fn new() -> Self { - let identity = Rc::new(Identity::new()); + let identity = Rc::new(Identity::default()); let inbox = Inbox::new(Rc::clone(&identity)); // Self { _identity: identity, @@ -31,6 +31,20 @@ impl Context { } } + pub fn new_with_name(name: impl Into) -> Self { + let identity = Rc::new(Identity::new(name)); + let inbox = Inbox::new(Rc::clone(&identity)); // + Self { + _identity: identity, + store: ConversationStore::new(), + inbox, + } + } + + pub fn get_friendly_name(&self) -> &str { + self._identity.get_name() + } + pub fn create_private_convo( &mut self, remote_bundle: &Introduction,