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

Random character in slack from irc #144

Open
philliproso opened this issue Jul 20, 2016 · 4 comments
Open

Random character in slack from irc #144

philliproso opened this issue Jul 20, 2016 · 4 comments

Comments

@philliproso
Copy link

The slack-irc bot adds a random character to the slack message, sometimes really strangely.

IRC message example
PROBLEM - xxxxxxxxxxxxxxxxxxx
IRC message in slack
PROBLEM - 5xxxxxxxxxxxxx

Any idea where this comes from or where I should look.

@ekmartin
Copy link
Owner

If you export NODE_ENV as development you should see a debug log for each Slack message posted (i.e. NODE_ENV=development slack-irc --config). Then you can see the raw message that gets posted to Slack, should help with debugging.

@philliproso
Copy link
Author

I narrowed it down to the parseText method in bot.js
https://github.com/ekmartin/slack-irc/blob/master/lib/bot.js

@ekmartin
Copy link
Owner

There's a test for that here: https://github.com/ekmartin/slack-irc/blob/master/test/bot.test.js#L268

You could try adding an assertion using the input message that produces the weird output, then removing replace statements from parseText until it stays the same (for example).

@anarchivist
Copy link

I'm wondering if this has something to do with the escape sequences and color codes that are being sent:

screen shot 2016-10-26 at 4 14 21 pm

screen shot 2016-10-26 at 4 14 27 pm

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

3 participants