this post was submitted on 09 Feb 2024
54 points (100.0% liked)

Fediverse

28281 readers
663 users here now

A community to talk about the Fediverse and all it's related services using ActivityPub (Mastodon, Lemmy, KBin, etc).

If you wanted to get help with moderating your own community then head over to !moderators@lemmy.world!

Rules

Learn more at these websites: Join The Fediverse Wiki, Fediverse.info, Wikipedia Page, The Federation Info (Stats), FediDB (Stats), Sub Rehab (Reddit Migration), Search Lemmy

founded 1 year ago
MODERATORS
 

It's been a while since I've last posted about this package and quite a lot has changed since then.


So, what does this package do? It adds support for webhooks to Lemmy in an efficient way, meaning you can subscribe to various events like a new post created, new comment added and so on. Very useful, for example, for automods or other bots that need to react fast.

Since the last time I've added more object types, so in addition to posts and comments you can now listen for:

  • comment reports
  • instances being added or updated (for example federation changes)
  • local users (users local to your instance, it's a distinct type from all users, it contains stuff like email and other stuff that doesn't get federated to other instances)
  • all users in general (this includes federated and local users)
  • post reports
  • private messages (does not contain the message text itself, only metadata like recipient and the author)
  • private message reports
  • registration applications

Another huge improvement is an api that allows users to create webhook and even more importantly a simple GUI for management of your webhooks. This means that this package is no longer only for instance admins, but bot authors in general can ask their instance admins for access to webhooks (and to install the webhooks package to their Lemmy instance if they don't have it yet) and if the admins grant it, you now have access to webhooks. Every access is scoped, meaning if your bot only needs access to posts, you don't need to ask for the permission to receive registration applications, meaning admins can freely grant you access to webhooks without also giving you access to stuff you shouldn't have access to.


There's also support for bulk import of webhooks based on a YAML document, meaning creators of bots and other applications that have support for webhooks can create a YAML document with all the webhooks other people then can import without any trouble. Each imported webhook needs a unique ID which allows the system to track changes to it which allows the importer to update old webhooks instead of duplicating them (as long as they share the same ID).


Let me know what you think, your ideas for improvements or any comments in general are welcome!


P.S. If someone wants to try it out, you can use my instance. The webhooks are available at https://webhooks.lemmings.world (accounts must be manually approved, so be patient and ideally write me a PM if you want the access quicker).

top 1 comments
sorted by: hot top controversial new old
[–] shnizmuffin@lemmy.inbutts.lol 4 points 9 months ago

This is super cool.