Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pinheadmz opened this issue Nov 12, 2019 · 0 comments

Comments

@pinheadmz
Copy link

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):

slack-irc/lib/bot.js

Lines 165 to 168 in a549f5a

.replace(/<@(U\w+)\|?(\w+)?>/g, (match, userId, readable) => {
const { name } = dataStore.getUserById(userId);
return readable || `@${name}`;
})

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant