Mercurial > libervia-backend
comparison sat_frontends/primitivus/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 | ab2696e34d29 |
children | 9d0df638c8b4 |
comparison
equal
deleted
inserted
replaced
3100:cea52c9ddfd9 | 3101:ab7e8ade848a |
---|---|
281 self.parent.host.redraw() # FIXME: should not be necessary | 281 self.parent.host.redraw() # FIXME: should not be necessary |
282 | 282 |
283 | 283 |
284 class Chat(PrimitivusWidget, quick_chat.QuickChat): | 284 class Chat(PrimitivusWidget, quick_chat.QuickChat): |
285 def __init__(self, host, target, type_=C.CHAT_ONE2ONE, nick=None, occupants=None, | 285 def __init__(self, host, target, type_=C.CHAT_ONE2ONE, nick=None, occupants=None, |
286 subject=None, profiles=None): | 286 subject=None, statuses=None, profiles=None): |
287 self.filters = [] # list of filter callbacks to apply | 287 self.filters = [] # list of filter callbacks to apply |
288 self.mess_walker = urwid.SimpleListWalker([]) | 288 self.mess_walker = urwid.SimpleListWalker([]) |
289 self.mess_widgets = urwid.ListBox(self.mess_walker) | 289 self.mess_widgets = urwid.ListBox(self.mess_walker) |
290 self.chat_widget = urwid.Frame(self.mess_widgets) | 290 self.chat_widget = urwid.Frame(self.mess_widgets) |
291 self.chat_colums = urwid.Columns([("weight", 8, self.chat_widget)]) | 291 self.chat_colums = urwid.Columns([("weight", 8, self.chat_widget)]) |
292 self.pile = urwid.Pile([self.chat_colums]) | 292 self.pile = urwid.Pile([self.chat_colums]) |
293 PrimitivusWidget.__init__(self, self.pile, target) | 293 PrimitivusWidget.__init__(self, self.pile, target) |
294 quick_chat.QuickChat.__init__( | 294 quick_chat.QuickChat.__init__( |
295 self, host, target, type_, nick, occupants, subject, profiles=profiles | 295 self, host, target, type_, nick, occupants, subject, statuses, |
296 profiles=profiles | |
296 ) | 297 ) |
297 | 298 |
298 # we must adapt the behaviour with the type | 299 # we must adapt the behaviour with the type |
299 if type_ == C.CHAT_GROUP: | 300 if type_ == C.CHAT_GROUP: |
300 if len(self.chat_colums.contents) == 1: | 301 if len(self.chat_colums.contents) == 1: |