comparison libervia/pages/forums/topics/page_meta.py @ 1243:8aff742d0dd0

pages: updated `identityGet` call, following backend changes
author Goffi <goffi@goffi.org>
date Sun, 19 Apr 2020 22:56:59 +0200
parents f511f8fbbf8a
children 6b7f9c3558cc
comparison
equal deleted inserted replaced
1242:8f39d98416c5 1243:8aff742d0dd0
4 from libervia.server.constants import Const as C 4 from libervia.server.constants import Const as C
5 from twisted.internet import defer 5 from twisted.internet import defer
6 from sat.core.i18n import _ 6 from sat.core.i18n import _
7 from sat.core.log import getLogger 7 from sat.core.log import getLogger
8 from sat.tools.common import uri as xmpp_uri 8 from sat.tools.common import uri as xmpp_uri
9 from sat.tools.common import data_format
9 10
10 log = getLogger(__name__) 11 log = getLogger(__name__)
11 12
12 name = "forum_topics" 13 name = "forum_topics"
13 access = C.PAGES_ACCESS_PUBLIC 14 access = C.PAGES_ACCESS_PUBLIC
34 author = topic["author"] 35 author = topic["author"]
35 topic["http_uri"] = self.getPageByName("forum_view").getURL( 36 topic["http_uri"] = self.getPageByName("forum_view").getURL(
36 parsed_uri["path"], parsed_uri["node"] 37 parsed_uri["path"], parsed_uri["node"]
37 ) 38 )
38 if author not in identities: 39 if author not in identities:
39 identities[topic["author"]] = yield self.host.bridgeCall( 40 id_raw = yield self.host.bridgeCall(
40 "identityGet", author, profile 41 "identityGet", author, [], True, profile
41 ) 42 )
43 identities[topic["author"]] = data_format.deserialise(id_raw)
44
42 template_data["topics"] = topics 45 template_data["topics"] = topics
43 46
44 47
45 @defer.inlineCallbacks 48 @defer.inlineCallbacks
46 def on_data_post(self, request): 49 def on_data_post(self, request):