RocketChat / feature-requests

This repository is used to track Rocket.Chat feature requests and discussions. Click here to open a new feature request.
21 stars 9 forks source link

Allow custom triggers be Registered Event #66

Open fasttrackhost opened 5 years ago

fasttrackhost commented 5 years ago

This is a REQUEST.

Allow the use of commands/triggers similar to mentions @ and Register a Event "new-trigger" when someone writes a chat message using a trigger. Something similar to giving actions to Bot, but instead it would give actions to external service.

Don't confuse with Commands sent to RocketChat embedded in a IFrame, this would be the reverse direction: commands from RocketChat to the web it is embedded in.

For example triggers could start with "$" and be something like: $likeYoutubeVideo [youtubeVideoId] $sendEmailToUser [userName] $openUserProfile [userName] $sendFriendshipRequest [userName] $askPermisionToFolder [userName][folderName] $sendPushNotificationToUser [userName][notificationTitle][NotificationText] $playVideoOnUserScreen [userName][videoTitle][videoUrl]

There should not be a defined set of triggers, instead allow the creation of custom triggers and simply let the Receiving web decide what to do with the trigger.

Put a button like "[KaTeX]" beneath the chat, referencing the trigger possibilities. In Administration, there should be a place where Admin can specify allowed triggers and allowed roles to see each trigger, so users see the possibility and can use them.

Triggers should send information about the user like id or username that wrote the trigger so web script can perform ACL, and decide if triggering user has enough rights to use that trigger. External web / service that was listening to Events on RocketChat IFrame, would perform the trigger and send back a result to the user, like a text message inside of the chat room where trigger was written (this can already be done using RocketChat Rest-API)

Please also add "Markdown" reference like "[KaTeX]" and like GitHub does, so chat users can learn and know to use it.

Would be great to be notified when such thing is possible.

geekgonecrazy commented 5 years ago

Transferred to feature requests