Fix nick from snapshot being ignored
This commit is contained in:
parent
e19ff7a622
commit
94a746f992
1 changed files with 5 additions and 1 deletions
|
|
@ -92,6 +92,10 @@ impl Joining {
|
|||
|
||||
fn joined(&self) -> Option<Joined> {
|
||||
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::<HashMap<_, _>>();
|
||||
Some(Joined {
|
||||
session: hello.session.clone(),
|
||||
session,
|
||||
account: hello.account.clone(),
|
||||
listing,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue