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

RichMessage.getEncodedMessage() breaks announcements #38

Open
dunntrevor opened this issue Apr 3, 2017 · 2 comments
Open

RichMessage.getEncodedMessage() breaks announcements #38

dunntrevor opened this issue Apr 3, 2017 · 2 comments

Comments

@dunntrevor
Copy link

dunntrevor commented Apr 3, 2017

In slack if you want to announce with a bot message you need to use <!channel>. When you include this in the message but call getEncodedMessage it does not work. However if you don't use the encoded message it does work.

see https://get.slack.help/hc/en-us/articles/202009646-Make-an-announcement. Scroll down to section labeled bot messages.

@plokijuma
Copy link

The same issue is present with user mentions, like <@Us2314>.
User mentions should not be encoded in message payload because < and > characters should be evaluated by Slack as control sequences. Currently it is sent as <@Us2314>

Manually turning off encoding method fixes the issue.

More details: https://api.slack.com/docs/message-formatting (Control sequences)

@davidkarlsen
Copy link

@plokijuma How can encoding be manually turned off? It seems encode() is always called?
It also breaks linking: https://api.slack.com/docs/messages/builder?msg=%7B%22text%22%3A%22This%20%3Chttp%3A%2F%2Fgoogle.com%7Ca%20link%3E%22%7D

Maybe there should be a boolean encode() option on a message object and in the reply method?

davidkarlsen added a commit to davidkarlsen/jbot that referenced this issue Jan 10, 2019
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