XMPP: Post to PubSub
sjehuda opened this issue · comments
- I have searched the issues (including closed ones) and believe that this is not a duplicate.
- I have searched the documentation and believe that my question is not covered.
- I am willing to lend a hand to help implement this feature.
Feature Request
Greetings!
In XMPP, using PubSub(1) (XEP-0060), it is possible to store posts as Atom Syndication(2) entries into XMPP(3).
There are several XMPP extensions that apply it, namely XEP-0227 (4) and XEP-0472 (5) which make node xmpp:microblog:0
as a common choice to manage news for client accounts (e.g. blog@getpelican.com
), yet a component account (e.g. pubsub.getpelican.com
) may use all of its nodes for this purpose.
pubsub.getpelican.com/
|
|-- updates/
|-- Sombre
`-- Varied
|-- releases/
`-- events/
pubsub service/
|
|-- node/
|-- item
`-- item
|-- node/
`-- node/
I have made a script using the slixmpp library that realizes viewing PubSub node items as Atom XML feeds over HTTP.
- XEP-0060: Publish-Subscribe
- RFC 4287: The Atom Syndication Format
- Atom Over XMPP
- XEP-0277: Microblogging over XMPP
- XEP-0472: Pubsub Social Feed
- PubSub Over HTTP
I am willing to assist to add this feature.
I beg your pardon. Please move this to getpelican/pelican-plugins/issues
That would be really cool. Especially if a comment section could be done that way too.
Nodes
Yes, comments can also be managed in a similar manner.
Perhaps XEP-0248 PubSub Collection Nodes would be useful for comments, though it might not be necessary.
Publishings node
|- Item (ID: 0001)
|- Atom entry (HTML inside)
|- Item (ID: 0002)
|- Item (ID: 0003)
|- etc.
Comments node
|- Item (ID: 0001)
|- Comment
|- Comment
|- Comment
|- Comment
|- Item (ID: 0002)
|- Comment
|- Comment
|- Comment
|- Item (ID: 0003)
|- Comment
|- Comment
|- etc.
We can allocate them by nodes
node | access | note |
---|---|---|
publishings.getpelican.com | public | HTML as Atom feed is stored |
comments.getpelican.com | public | where we manage comments |
sources.getpelican.com | admins | Markdown / reStructuredText |
attachments.getpelican.com | ? | This can be done too |
XMPP Clients
In what fashion did you think to handle comments?
I suppose we can synchronize comments from HTTP and from XMPP.
For comments via XMPP, we might want XMPP clients (like Movim and Libervia) to handle.
Other clients: Once Pelican has PubSub support, it would be easy to persuade Dino, Cheogram, Converse, Gajim, Kaindan, monocles, Psi etc. to allow PubSub for comments and reactions.
More Information
We have a good discussion at Chyrp Lite (PHP CMS)
xenocrat/chyrp-lite#250
I have also made a proposal for scheme for managing CMS in node
movim/movim#1312
Please be aware of the following implementations.
Reading from PubSub
See code at: codeberg.org
Sending to PubSub
See function xmpp_pubsub_send_unread_items
at gitgud.io (it is function which calls to other functions that return node, item and send the result).
I am willing to handle the XMPP code for you if you want.
This is way over my head, I just happen to host my own Pelican and XMPP server and would really like to see an XMPP renaissance. Unfortunately, other than with licensing, I don’t think I can help much here. Would love to see how it all plays together though!
To make things even more connected, Libervia has some code to bridge XMPP PubSub with ActivityPub:
https://fosdem.org/2024/schedule/event/fosdem-2024-2857-bridging-open-protocols-xmpp-and-activitypub-gateway-via-libervia/
other than with licensing
Are you a lawyer too?