-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Automatically decode html entities #240
Comments
I agree, I now have to replace |
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. |
2 years later 😅 unless they are meanwhile? (mainly using Mattermost & Telegram currently) |
@jlsjonas thanks for the input -- did you see this when using the Event API or the RTM connection? Or both? |
If I remember correctly the project never used the RTM connection; so event API. Both might be affected though (untested) |
OK yes, I can confirm that the entities come through encoded with the events api. Now the question is, should this happen by default, or via an optional middleware? |
This little snippet of code will do the job, but since it requires a new dependency that would require extra work to keep up to date, I'm not sure if we should include this in core. THOUGHTS?
|
I would vouch to add it to core to remain consistent. Or alternatively put it in the documentation as a note to using the Slack events API? do you have any stats regarding usage (which could help decide between the 2 options)? Otoh, if someone creates something based on botkit and doesn't know about the difference for Slack events API this might cause issues that could only (relatively) be solved upstream to them. Eitherway I would use https://www.npmjs.com/package/entities instead though; as html-entities seems to be no longer maintained (looking at the open issues/pr's) |
Makes sense. Thanks for the recommendation on a better entity package. |
Shouldn't messages received from Slack be automatically html-decoded ?
The text was updated successfully, but these errors were encountered: