67P / hyperchannel

Kosmos Chat for the Web
Mozilla Public License 2.0
20 stars 3 forks source link

Web Push Notifications for username mentions #150

Closed raucao closed 6 years ago

raucao commented 6 years ago

For the default Freenode space to work with this, it still needs a change on the dev server to be configured via Chef, but I'm sitting in a train currently.

In general, this subscribes to notifications via the API provided by hubot-web-push-notifications, a Hubot script which I wrote a short while ago, and which will notify subscribed users of mentions, when their username is not currently online. (That means it will not work if you're online via a bouncer or sth.)

In order to subscribe, you just click on the space name in the sidebar to find the button there.

It also removes the old broccoli-serviceworker thing and adds a more mature extensible solution aptly called Ember Service Worker. The worker itself lives in a seperate module, which I gave the longest name ever (but it totally makes sense): ember-service-worker-hubot-web-push-notifications

Side note: a general issue we'll have to solve is how a client can automatically discover Kosmos agents/bots/logs. I had the idea of setting up some kind of transparent directory service, which is easy to contribute to. This would also apply to finding and easily connecting to servers/networks in general, not just special services on them, like these push notifications. Maybe someone else had similar ideas?

refs #2

galfert commented 6 years ago

Looks good. I think the Travis failure is because of the wrong closing brace in config/space-presets.json.

raucao commented 6 years ago

I'll deploy it from this branch before merging. Thanks for having a look!

raucao commented 6 years ago

Had to fix the web push hubot script some more, but it works now! \o/