Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XMPP: Post to PubSub #3300

Open
3 tasks done
sjehuda opened this issue Apr 17, 2024 · 6 comments
Open
3 tasks done

XMPP: Post to PubSub #3300

sjehuda opened this issue Apr 17, 2024 · 6 comments

Comments

@sjehuda
Copy link

sjehuda commented Apr 17, 2024

  • 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.

  1. XEP-0060: Publish-Subscribe
  2. RFC 4287: The Atom Syndication Format
  3. Atom Over XMPP
  4. XEP-0277: Microblogging over XMPP
  5. XEP-0472: Pubsub Social Feed
  6. PubSub Over HTTP

I am willing to assist to add this feature.

@sjehuda
Copy link
Author

sjehuda commented Apr 18, 2024

I beg your pardon. Please move this to getpelican/pelican-plugins/issues

@silverhook
Copy link

That would be really cool. Especially if a comment section could be done that way too.

@sjehuda
Copy link
Author

sjehuda commented Apr 24, 2024

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

@sjehuda
Copy link
Author

sjehuda commented Apr 24, 2024

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.

@silverhook
Copy link

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/

@sjehuda
Copy link
Author

sjehuda commented Apr 24, 2024

other than with licensing
Are you a lawyer too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants