# HG changeset patch # User Goffi # Date 1657796130 -7200 # Node ID 384ad98ea9fe5ae896a06c89621f8d190a1b0836 # Parent ef824b1091f34185bcc7cd04b94ae4d74f46abb3 component AP gateway: we need to use `actor` and not `attributedTo` for activities: `attributedTo` may not be filled, notably when the object is a string URL diff -r ef824b1091f3 -r 384ad98ea9fe sat/plugins/plugin_comp_ap_gateway/__init__.py --- a/sat/plugins/plugin_comp_ap_gateway/__init__.py Thu Jul 14 12:55:30 2022 +0200 +++ b/sat/plugins/plugin_comp_ap_gateway/__init__.py Thu Jul 14 12:55:30 2022 +0200 @@ -970,7 +970,7 @@ comment_node = comment_data["node"] await self._p.subscribe(client, comment_service, comment_node) ap_item = await self.mbdata2APitem(client, mb_data) - url_actor = ap_item["object"]["attributedTo"] + url_actor = ap_item["actor"] elif item.name == "retract": url_actor, ap_item = await self.apDeleteItem( client.jid, node, item["id"] @@ -1690,7 +1690,7 @@ raise exceptions.DataError("Can't get ActivityPub actor inbox") item_data = await self.mbdata2APitem(client, mess_data) - url_actor = item_data["object"]["attributedTo"] + url_actor = item_data["actor"] resp = await self.signAndPost(inbox_url, url_actor, item_data) if resp.code != 202: raise exceptions.NetworkError(f"unexpected return code: {resp.code}")