# Common event system for chatrooms - a specification

**URL:** <https://meta.discourse.org/t/common-event-system-for-chatrooms-a-specification/59245>\
**Category:** Feature\
**Created:** [16. März 2017 um 13:01 UTC](https://meta.discourse.org/t/common-event-system-for-chatrooms-a-specification/59245 "2017-03-16T13:01:04Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)\
**Post date:** [16. März 2017 um 15:21 UTC](https://meta.discourse.org/t/common-event-system-for-chatrooms-a-specification/59245/6 "2017-03-16T15:21:32Z")

</div>

Thanks for the effort @david but I agree with @sam it’s above and beyond what I had in mind. When in doubt I like to keep things simple and build up 🙂

1. This should definitely be a plugin, as not every discourse wants to integrate with a chat system. Something like `discourse-chat` for core support, and then `discourse-chat-slack`, `discourse-chat-hipchat` for adapters.

2. I also agree with @falco that it should begin with only supporting admins. I don’t have a problem with an admin entering an API on an admin page to configure it either – fancy configuration by visiting a page would obviously be better but let’s start simple 🙂

3. The core plugin would attach to existing events in the site and expose others, like: `DiscourseEvent.trigger(:notify_chat, msg)` where `msg` would be an object full of things we can expose to chat providers.

4. Providers would then listen for that and do the work necessary to publish.

---

_[View the full topic](https://meta.discourse.org/t/common-event-system-for-chatrooms-a-specification/59245)._
