Mercurial > libervia-web
comparison libervia/pages/chat/page_meta.py @ 1241:921e9f2a97af
pages (chat): renamed `extra` argument to `extra_s` as it is now serialised
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 14 Feb 2020 15:21:24 +0100 |
parents | 4ccc5bb65be2 |
children | 8aff742d0dd0 |
comparison
equal
deleted
inserted
replaced
1240:14c0f666a93d | 1241:921e9f2a97af |
---|---|
1 #!/usr/bin/env python3 | 1 #!/usr/bin/env python3 |
2 | 2 |
3 from sat.core.i18n import _ | 3 from sat.core.i18n import _ |
4 from twisted.internet import defer | 4 from twisted.internet import defer |
5 from sat.core.log import getLogger | 5 from sat.core.log import getLogger |
6 | |
7 log = getLogger(__name__) | |
8 from sat.tools.common import data_objects | 6 from sat.tools.common import data_objects |
9 from twisted.words.protocols.jabber import jid | 7 from twisted.words.protocols.jabber import jid |
10 from libervia.server.constants import Const as C | 8 from libervia.server.constants import Const as C |
11 from libervia.server import session_iface | 9 from libervia.server import session_iface |
10 | |
11 | |
12 log = getLogger(__name__) | |
12 | 13 |
13 name = "chat" | 14 name = "chat" |
14 access = C.PAGES_ACCESS_PROFILE | 15 access = C.PAGES_ACCESS_PROFILE |
15 template = "chat/chat.html" | 16 template = "chat/chat.html" |
16 dynamic = True | 17 dynamic = True |
123 if signal == "messageNew": | 124 if signal == "messageNew": |
124 rdata = self.getRData(request) | 125 rdata = self.getRData(request) |
125 template_data_update = {"msg": data_objects.Message((args))} | 126 template_data_update = {"msg": data_objects.Message((args))} |
126 target_jid = rdata["target"] | 127 target_jid = rdata["target"] |
127 identities = rdata["identities"] | 128 identities = rdata["identities"] |
128 uid, timestamp, from_jid_s, to_jid_s, message, subject, mess_type, extra, __ = ( | 129 uid, timestamp, from_jid_s, to_jid_s, message, subject, mess_type, extra_s, __ = ( |
129 args | 130 args |
130 ) | 131 ) |
131 from_jid = jid.JID(from_jid_s) | 132 from_jid = jid.JID(from_jid_s) |
132 to_jid = jid.JID(to_jid_s) | 133 to_jid = jid.JID(to_jid_s) |
133 if ( | 134 if ( |