Horndev / zapread.com

Website for zapread.com
https://www.zapread.com
GNU Affero General Public License v3.0
19 stars 4 forks source link

WebHooks #509

Open wfinn opened 4 years ago

wfinn commented 4 years ago

Feature Request: ZapRead WebHooks

It would be nice, if I didn't have to poll for zapread events.
If zapread would notify a server I own of new events, I could instantly react to anything which would have the following pros.

As a first step it would be nice if I'd be notified about the fact that I have a new message or alert.
That should be relatively easy to implement at first, most events are actually in /Messages/Unread?xyz.

I think other users are also interested in features like this #65

"Draft"

Disclaimer: I have no idea how this is usually done, just thinking how I could solve my problem. We'd need some UI to enter a url, let's call the variable webhook_url. Then, when there's a new alert or message for me, the server GETs let's say webhook_url + /NewMessageOrAlert.
My server would recieve the GET and then poll /Messages/Unread for new Messages and Alerts, handle them and wait for the next event to occur.

wfinn commented 4 years ago

I might not need that anymore, I took a look at the websocket stuff and it's decent!

E.g. a chat bot is already possible!

I couldn't get everything yet, but it is already much more detailed than my proposed webhook. It doesn't seem to trigger for all alerts/messages yet, or I couldn't get it to work yet, but I would actually close this.

Horndev commented 4 years ago

I still think it could be useful as an option for some users. I'll leave it open for now.