From 94a746f992e077c5ef3cbe38990a173fa9125dd0 Mon Sep 17 00:00:00 2001 From: Joscha Date: Sun, 24 Jul 2022 18:54:44 +0200 Subject: [PATCH] Fix nick from snapshot being ignored --- src/euph/conn.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/euph/conn.rs b/src/euph/conn.rs index c723211..067fddc 100644 --- a/src/euph/conn.rs +++ b/src/euph/conn.rs @@ -92,6 +92,10 @@ impl Joining { fn joined(&self) -> Option { if let (Some(hello), Some(snapshot)) = (&self.hello, &self.snapshot) { + let mut session = hello.session.clone(); + if let Some(nick) = &snapshot.nick { + session.name = nick.clone(); + } let listing = snapshot .listing .iter() @@ -99,7 +103,7 @@ impl Joining { .map(|s| (s.id.clone(), s)) .collect::>(); Some(Joined { - session: hello.session.clone(), + session, account: hello.account.clone(), listing, })