ekmartin / slack-irc

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

slack user email names getting injected into text, replacing organization name #268

Open pinheadmz opened 4 years ago

pinheadmz commented 4 years ago

Our organization is called bcoin. One of our users has signed up to slack with an email address in their own domain, as many savvy people do who want to to monitor how their email addresses are leaked or shared.

Username: HeyFakename Email address: bcoin@heyfakename.com

The result is, whenever anyone types bcoin into IRC (which we do a lot... because that's the name of the project AND the IRC channel #bcoin) in Slack the word gets replaced with the user's slack handle.

Example:

IRC: Hey guys I really enjoy using bcoin for my project --> Slack: Hey guys I really enjoy using @HeyFakename for my project

I was able to prevent this in most cases by just pulling out this regex replacement (I'm not concerned with IRC users trying to "@" slack users):

https://github.com/ekmartin/slack-irc/blob/a549f5ab850488a99e0b62217674b6f258defd89/lib/bot.js#L165-L168

There is still a lingering issue where if an IRC user types exactly @bcoin, then Slack will replace that with @HeyFakename anyway... but I think that might just be a Slack thing.