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

Add webhook notification support for actions. #94

Open
digisomni opened this issue Jul 10, 2021 · 5 comments
Open

Add webhook notification support for actions. #94

digisomni opened this issue Jul 10, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@digisomni
Copy link
Member

This would work: "When a user logs in or is added to a domain" then "send a webhook notification".

Specifically, the first implementation desired would be for it to notify a Discord webhook. This would be opt-in for the "Place" itself to report.

In general, there could be a hook to report when the users and worlds online numbers change as well.

@Misterblue
Copy link
Collaborator

Would the implementation be a list of URLs that can be added to a Place that cause a POST operation (that contains an informational JSON body)> Would there be multiple lists of URLs (avatar entry, avatar exit, beacon information update, ...)?

@Misterblue
Copy link
Collaborator

The Github implementation is that there is a list of WebHooks which each have an URL, HTTPs cert info, a secret, and the action that invokes it. That is also a possibility.

Is having a secret associated with the hook URL sufficient? There would have to be code to hide it from non Place owners/managers (like the beacon secret).

@digisomni
Copy link
Member Author

Would the implementation be a list of URLs that can be added to a Place that cause a POST operation (that contains an informational JSON body)> Would there be multiple lists of URLs (avatar entry, avatar exit, beacon information update, ...)?

In this case, I would reckon we could follow the GitHub model of "creating a webhook" and then we get to fill out the information such as a URL, secret, and then of course the triggers for it. So we can pick which events we want to trigger this webhook. Many webhooks can then be made for a single trigger.

@digisomni digisomni added the enhancement New feature or request label Jul 16, 2021
@digisomni
Copy link
Member Author

The Github implementation is that there is a list of WebHooks which each have an URL, HTTPs cert info, a secret, and the action that invokes it. That is also a possibility.

Is having a secret associated with the hook URL sufficient? There would have to be code to hide it from non Place owners/managers (like the beacon secret).

If those parameters are sufficient for GH then I suppose they've already considered the extent of what web hooks typically use and need, no?

Though the part about HTTPS cert info, I don't recall seeing that. I will have to look again.

@Misterblue
Copy link
Collaborator

My current thinking is that WebHooks would be a general feature. Maybe add them to Requests where hooks are defined for events and then scatter "Fire(event)" everywhere so there are lots of different actions that can be hooked (account adds friend, domain registered, account goes inactive, ...). There are a bunch of permission questions but that would be a general resource where anyone could create a Watcher for all sorts of different things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants