ekmartin / slack-irc

Connects Slack and IRC channels by sending messages back and forth.
MIT License
588 stars 157 forks source link

Slack-style combined join/leave messages #87

Open laughinghan opened 8 years ago

laughinghan commented 8 years ago

Slack has an ingenious and honestly, in retrospect, pretty obvious solution to the problem of join/leave messages being "spammy" in large channels, which is to combine adjacent ones:

image (If you want to see for yourself, it's this message in this public Slack team.)

Slack's API offers the ability to update previously-posted messages, just like real human users can edit their previous messages, and we can even italicize the message with formatting, right? We can't gray out our message and obviously it won't be combined with any actual Slack join/leave messages, but I think we can almost entirely replicate Slack's combined join/leave messages!

This would also address a minor annoyance I have with the current implementation of join/leave messages in slack-irc which is that it uses the bot's IRC nickname, which for me has "Slack" in the name but not "IRC" (since normally the bot's nickname never shows up in Slack at all, join/leave messages are currently the only case). Instead we should, like Slack itself, use the username and avatar of the first user we're reporting joining/leaving.

laughinghan commented 8 years ago

@ekmartin Thoughts on this? Of the comments I'd made this is the one that I think would be the most useful improvement and is the one you didn't reply to! Haha

I honestly think this would deal with join/leave spam so well even for large channels that it'd make sense to turn on by default.

ekmartin commented 8 years ago

Sorry, I completely missed this one. Sounds like a great idea, although it would probably require a bit of code to get it working smoothly. I won't have time to work on this for at least a month (going abroad), so if you want want to give it a shot that would be awesome.