hubot-archive / hubot-tell

Hubot plugin to send a user a message the next time they are present in the room
MIT License
26 stars 15 forks source link

tell: send replies on room entry AND next time leaves a message #5

Closed parkr closed 8 years ago

parkr commented 8 years ago

Hey @lorenzhs, @patcon, & co!

We're using Slack and we rarely actually leave & re-enter rooms. We'd like the ability to have hubot send a user the messages others have left for them next time the user leaves any messages in the channel. Some users get so many notifications (common name, manager with many reports, etc) that it becomes difficult for them to parse through all the notifications they get. They get buried easily.

This change listens for any activity and checks if the user has messages. If the user has messages, it writes them out! It essentially just mirrors the activity for entering but based on arbitrary messages.

lorenzhs commented 8 years ago

Thanks, this looks like it'd be suitable for other chat protocols where users idle a lot as well (e.g. IRC). Since my coffeescript is quite rusty, I'll delegate clicking the merge button to @xhochy. From what I can tell this looks good though :)

parkr commented 8 years ago

Thanks so much, @lorenzhs! I'm happy to make it conditional per some env var, too, if you'd like. For now, I think this is useful. People idle a lot in IRC nowadays, too. Campfire, where this was most useful because users had to login every time, this is less useful. That said, Campfire is dead.