Update own session on who command
This commit is contained in:
parent
ed2bd2a2c6
commit
4cd422493b
1 changed files with 8 additions and 6 deletions
|
|
@ -460,11 +460,13 @@ class Room:
|
||||||
reply = await self._connection.send("who", {})
|
reply = await self._connection.send("who", {})
|
||||||
data = self._extract_data(reply)
|
data = self._extract_data(reply)
|
||||||
|
|
||||||
own_id = self._session.session_id if self._session is not None else None
|
users = LiveSessionListing.from_data(self, data["listing"])
|
||||||
self._users = LiveSessionListing.from_data(
|
# Assumes that self._session is set (we're connected)
|
||||||
self,
|
session = users.get(self.session.session_id)
|
||||||
data["listing"],
|
if session is not None:
|
||||||
exclude_id = own_id
|
self._session = session
|
||||||
)
|
self._users = users.with_part(self._session)
|
||||||
|
else:
|
||||||
|
self._users = users
|
||||||
|
|
||||||
return self._users
|
return self._users
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue