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

getting encoding message issue when sent ordinary text #907

Closed
hbakhtiyor opened this issue Jun 27, 2017 · 12 comments
Closed

getting encoding message issue when sent ordinary text #907

hbakhtiyor opened this issue Jun 27, 2017 · 12 comments

Comments

@hbakhtiyor
Copy link

when i sent Ooops, something went wrong!, it displays Ooops, something went wrong%21
the ! char encoded to %21

how to resolve it?

@peterswimm
Copy link
Contributor

Can you post a snippet of your code?

@hbakhtiyor
Copy link
Author

i used the sample using with replyPrivateDelayed & replyPublicDelayed

@peterswimm
Copy link
Contributor

And you didnt edit any code? Did you follow the instructions as he posted on the medium article?
https://api.slack.com/tutorials/easy-peasy-slash-commands

My guess without seeing your project that either you copy pasted some bad code, or missed a step.

@hbakhtiyor
Copy link
Author

hmm, just use Delayed version, you'll reproduce it, I properly followed and configured!

@hbakhtiyor
Copy link
Author

@peterswimm did you try it?

@peterswimm
Copy link
Contributor

peterswimm commented Jul 24, 2017

@hbakhtiyor I did not! You might also try posting the question in our deve community if you are 100% sure about your code and Slack side setup:

https://community.botkit.ai/

@0xceb1d
Copy link

0xceb1d commented Mar 13, 2018

Any more on this? Having encoding issues with Slack and the / character.
1/1 becomes 1/1

@stale
Copy link

stale bot commented Oct 22, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 22, 2018
@hbakhtiyor
Copy link
Author

up

@stale stale bot removed the stale label Oct 24, 2018
@adantoscano
Copy link
Contributor

Have you tried with this #240 ?

@stale
Copy link

stale bot commented Dec 23, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 23, 2018
@stale stale bot closed this as completed Dec 30, 2018
@cooperka
Copy link
Contributor

cooperka commented Nov 1, 2019

The issue description here is ambiguous, but I'm encountering this when sending messages from the bot. Some random outgoing messages will be url-encoded, with normal characters like apostrophe coming out as '.

My workaround is to use a send middleware to decode:

import { decode } from 'he';

controller.middleware.send.use((bot, message, next) => {
  // Decode outgoing messages to make sure there are no weird URI encoded characters.
  // Encoding happens automatically sometimes for unknown reasons.
  message.text = decode(message.text);

  next();
});

Note: These issues occur with the Twilio adapter, but the Emulator works fine.

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

No branches or pull requests

5 participants