Skip to content

events #4097

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

Open
coderofsalvation opened this issue May 2, 2025 · 2 comments · May be fixed by #4099
Open

events #4097

coderofsalvation opened this issue May 2, 2025 · 2 comments · May be fixed by #4099
Labels
feature User-facing features and product enhancements

Comments

@coderofsalvation
Copy link

coderofsalvation commented May 2, 2025

problem

As a non-ruby dev I'd love to hook into manyfold events, without messing up the codebase :)
So how to make it more hackable without overcomplicating a REST interface?

possible solution

I'd love to be able to respond to database CRUD operations (when a user is created/updated/deleted e.g.) or trigger an external process elsewhere on my server.
Perhaps turning database-table read/write/update/delete-calls into WebSub events can help keep the manyfold codebase/features small.
This allows many (less interesting) features to be developed outside of the codebase, shifting the burden of non-core maintenance elsewhere.

context / background

Matrix conversation:

<sqz> Hi James, thanks for manyfold.
Any thoughts on easy 'hooking' into events for non-ruby devs?
Does activeadmin support webhooks/cli-hooks or something?
afaik postgres has triggers/pg_exec(), but I was just curious if there's other ways.

<james> Hey sqz, you're most welcome! Event hooks is a really cool idea, I hadn't thought about it, but I love that sort of thing, so yeah...
could do something like websub, or atom feeds, or anything really
and of course there's already stuff in activitypub as well
Could I get you to open a feature request on GitHub with some ideas of what sort of things you'd want to get events for, and what sort of interface you might want?
WebSub is probably my ideal...

<sqz>
Haven't heard of WebSub..but after reading about it, it looks like a W3C-favored flavor of webhook subscriptions ❤
@coderofsalvation coderofsalvation added the feature User-facing features and product enhancements label May 2, 2025
@Floppy
Copy link
Collaborator

Floppy commented May 2, 2025

I'm thinking about how this fits alongside and complements ActivityPub, and security.

If we assume websub, then you get a publish event with a URL; Then you can use the REST API to get any extra data you want. I don't want to be leaking out inaccessible data over less secure channels, so that makes sense in that it provides a way of getting a "ping", but you still need credentials to get the actual data. We could also allow the use of public hubs, we wouldn't necessarily need to send secure data in the event.

The implementation of that is actually really easy... hmmm.

@coderofsalvation
Copy link
Author

Agreed.
ActivityPub is great for 'hey this person made this public thing' (to the world).
Getting "pings" is enough imho, because as an admin you have access to REST/filesystem/database anyways.

@Floppy Floppy linked a pull request May 2, 2025 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature User-facing features and product enhancements
Projects
Development

Successfully merging a pull request may close this issue.

2 participants