comparison sat/plugins/plugin_comp_ap_gateway/pubsub_service.py @ 3888:aa7197b67c26

component AP gateway: AP <=> XMPP reactions conversions: - Pubsub Attachments plugin has been renamed to XEP-0470 following publication - XEP-0470 has been updated to follow 0.2 changes - AP reactions (as implemented in Pleroma) are converted to XEP-0470 - XEP-0470 events are converted to AP reactions (again, using "EmojiReact" from Pleroma) - AP activities related to attachments (like/reactions) are cached in Libervia because it's not possible to retrieve them from Pleroma instances once they have been emitted (doing an HTTP get on their ID returns a 404). For now those cache are not flushed, this should be improved in the future. - `sharedInbox` is used when available. Pleroma returns a 500 HTTP error when ``to`` or ``cc`` are used in a direct inbox. - reactions and like are not currently used for direct messages, because they can't be emitted from Pleroma in this case, thus there is no point in implementing them for the moment. rel 371
author Goffi <goffi@goffi.org>
date Wed, 31 Aug 2022 17:07:03 +0200
parents 37d2c0282304
children 0aa7023dcd08
comparison
equal deleted inserted replaced
3887:6090141b1b70 3888:aa7197b67c26
93 text="No user part specified" 93 text="No user part specified"
94 ) 94 )
95 requestor_actor_id = self.apg.buildAPURL(TYPE_ACTOR, requestor.userhost()) 95 requestor_actor_id = self.apg.buildAPURL(TYPE_ACTOR, requestor.userhost())
96 recipient_account = self.apg._e.unescape(recipient.user) 96 recipient_account = self.apg._e.unescape(recipient.user)
97 recipient_actor_id = await self.apg.getAPActorIdFromAccount(recipient_account) 97 recipient_actor_id = await self.apg.getAPActorIdFromAccount(recipient_account)
98 inbox = await self.apg.getAPInboxFromId(recipient_actor_id) 98 inbox = await self.apg.getAPInboxFromId(recipient_actor_id, use_shared=False)
99 return requestor_actor_id, recipient_actor_id, inbox 99 return requestor_actor_id, recipient_actor_id, inbox
100 100
101 101
102 @ensure_deferred 102 @ensure_deferred
103 async def publish(self, requestor, service, nodeIdentifier, items): 103 async def publish(self, requestor, service, nodeIdentifier, items):