Mercurial > libervia-backend
comparison sat_frontends/quick_frontend/quick_chat.py @ 3101:ab7e8ade848a
plugin XEP-0045: added room statuses to metadata:
room statuses are now sent with other metadata on bridge signals, and saved in Room
instance. They give useful data on the room, for instance they can be used to know if a
full jid is used in this room.
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 30 Dec 2019 20:44:02 +0100 |
parents | 95c94d94872d |
children | 9d0df638c8b4 |
comparison
equal
deleted
inserted
replaced
3100:cea52c9ddfd9 | 3101:ab7e8ade848a |
---|---|
262 | 262 |
263 class QuickChat(quick_widgets.QuickWidget): | 263 class QuickChat(quick_widgets.QuickWidget): |
264 visible_states = ["chat_state"] # FIXME: to be removed, used only in quick_games | 264 visible_states = ["chat_state"] # FIXME: to be removed, used only in quick_games |
265 | 265 |
266 def __init__(self, host, target, type_=C.CHAT_ONE2ONE, nick=None, occupants=None, | 266 def __init__(self, host, target, type_=C.CHAT_ONE2ONE, nick=None, occupants=None, |
267 subject=None, profiles=None): | 267 subject=None, statuses=None, profiles=None): |
268 """ | 268 """ |
269 @param type_: can be C.CHAT_ONE2ONE for single conversation or C.CHAT_GROUP for | 269 @param type_: can be C.CHAT_ONE2ONE for single conversation or C.CHAT_GROUP for |
270 chat à la IRC | 270 chat à la IRC |
271 """ | 271 """ |
272 self.lang = "" # default language to use for messages | 272 self.lang = "" # default language to use for messages |
297 "only group chat can have occupants or nick" | 297 "only group chat can have occupants or nick" |
298 ) | 298 ) |
299 self.messages = OrderedDict() # key: uid, value: Message instance | 299 self.messages = OrderedDict() # key: uid, value: Message instance |
300 self.games = {} # key=game name (unicode), value=instance of quick_games.RoomGame | 300 self.games = {} # key=game name (unicode), value=instance of quick_games.RoomGame |
301 self.subject = subject | 301 self.subject = subject |
302 self.statuses = set(statuses or []) | |
302 lt = time.localtime() | 303 lt = time.localtime() |
303 self.day_change = ( | 304 self.day_change = ( |
304 lt.tm_year, | 305 lt.tm_year, |
305 lt.tm_mon, | 306 lt.tm_mon, |
306 lt.tm_mday, | 307 lt.tm_mday, |