Add allsessions
This commit is contained in:
parent
0f23259e04
commit
f05503b871
5
model.py
5
model.py
@ -72,10 +72,11 @@ class Model(object):
|
|||||||
|
|
||||||
async def send_state(self, clientid):
|
async def send_state(self, clientid):
|
||||||
# TODO: compute state, send to client
|
# TODO: compute state, send to client
|
||||||
session = "deine mudda"
|
session = "No session"
|
||||||
if "session" in self.model["clients"][clientid]:
|
if "session" in self.model["clients"][clientid]:
|
||||||
session = self.model["clients"][clientid]["session"]
|
session = self.model["clients"][clientid]["session"]
|
||||||
data = {"session": session}
|
allsessions = [ name for name in self.model["sessions"] ]
|
||||||
|
data = {"currentsession": session, "allsessions": allsessions}
|
||||||
for socket in self.sockets[clientid]:
|
for socket in self.sockets[clientid]:
|
||||||
await socket.send_json(data)
|
await socket.send_json(data)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user