Push-EDX / flarum-ext-chat

Flarum chat for pushedx.net
MIT License
14 stars 16 forks source link

Use events #30

Open jtojnar opened 7 years ago

jtojnar commented 7 years ago

So that it could be hooked into notify.

gpascualg commented 7 years ago

Maybe only for mentions with @? I don't clearly see how we would go about it though, as I see some problems:

Good idea though!

jtojnar commented 7 years ago

My use case is a Telegram chat for moderators, where every action on the fora is posted, so that moderators could react quickly if there is some problem.

Since the chat is common for all moderators, it would not make sense to only notify about mentions. Or there would need to be an option for selecting the users/user group, whose mention would trigger the notification.

For convenience, the message text should be included, so that moderators do not need to visit the site each time a new message is posted, even if it is okay. Link to the specific chat line would be nice, but it is not a necessity – for now, the message still needs to be erased in the database.

In conclusion, the only critical thing is triggering an event when a message is posted. There is a nice example in flagrow/upload.

gpascualg commented 7 years ago

Oh my bad, I completely misunderstood you. I thought you meant notifications, as in the "new answer in post" notification.

That completely changes it, and it is much more easy and direct to do. I agree it would be nice to have such functionality!