comparison libervia/pages/chat/page_meta.py @ 1232:4ccc5bb65be2

pages (chat): handle room statuses following backend change
author Goffi <goffi@goffi.org>
date Sun, 29 Dec 2019 17:36:25 +0100
parents b2d067339de3
children 921e9f2a97af
comparison
equal deleted inserted replaced
1231:b9a8049ca1ff 1232:4ccc5bb65be2
1 #!/usr/bin/env python3 1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 2
4 from sat.core.i18n import _ 3 from sat.core.i18n import _
5 from twisted.internet import defer 4 from twisted.internet import defer
6 from sat.core.log import getLogger 5 from sat.core.log import getLogger
7 6
53 if "conference" in [i[0] for i in disco[1]]: 52 if "conference" in [i[0] for i in disco[1]]:
54 chat_type = C.CHAT_GROUP 53 chat_type = C.CHAT_GROUP
55 join_ret = yield self.host.bridgeCall( 54 join_ret = yield self.host.bridgeCall(
56 "mucJoin", target_jid.userhost(), "", "", profile 55 "mucJoin", target_jid.userhost(), "", "", profile
57 ) 56 )
58 already_joined, room_jid_s, occupants, user_nick, room_subject, __ = join_ret 57 (already_joined,
58 room_jid_s,
59 occupants,
60 user_nick,
61 room_subject,
62 room_statuses,
63 __) = join_ret
59 template_data["subject"] = room_subject 64 template_data["subject"] = room_subject
65 template_data["room_statuses"] = room_statuses
60 own_jid = jid.JID(room_jid_s) 66 own_jid = jid.JID(room_jid_s)
61 own_jid.resource = user_nick 67 own_jid.resource = user_nick
62 else: 68 else:
63 chat_type = C.CHAT_ONE2ONE 69 chat_type = C.CHAT_ONE2ONE
64 own_jid = profile_jid 70 own_jid = profile_jid