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 @references are rendered as <@UNIQUEID> #18

Closed
erikogan opened this issue Jul 26, 2015 · 4 comments
Closed

Slack @references are rendered as <@UNIQUEID> #18

erikogan opened this issue Jul 26, 2015 · 4 comments

Comments

@erikogan
Copy link
Contributor

When a user is referenced in a Slack message, it comes through in the body as <@uniqueid>. This causes lita-karma to work inconsistently on Slack.

Obviously, this can be fixed with a custom term_pattern to match it and a custom term_normalizer to look up the user. But I think the defaults should probably handle this case because it breaks the principle of least astonishment.

I’m going to dig into fixing it now.

@erikogan
Copy link
Contributor Author

I was hoping to switch the term_pattern and term_normalizer at start up time, to keep the performance effect of this change down. But when the plugin is being configured Lita.config.robot.adapter is set to :shell.

Is there a better way to query the configured adapter at start up, or is this the timing problem it appears to be?

@jimmycuadra
Copy link
Owner

Are you using the latest Slack adapter? That type of special Slack formatting should be removed from messages before being received by the robot now. If you're on the latest version of the adapter, I'd consider it a hole in our coverage of special Slack formatting that should be removed.

@erikogan
Copy link
Contributor Author

Interesting. I installed it without specifying a version in the Gemfile, so I assume that means I’m running the latest released version.

I can try running on the master branch on Github and see if it performs differently.

@erikogan
Copy link
Contributor Author

That’s worse. It expands @mention to “@Full name” with spaces, so in the case of karma it considers the last name the term: @erik++ expands to @Erik Ogan++

But now that I know it’s a bug in the lita-slack adapter, I can open an issue over there.

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

2 participants