alchemy icon indicating copy to clipboard operation
alchemy copied to clipboard

Fix `Alchemy.Reactions.Emoji.resolve/1` crashing all reaciton management related functions

Open aramsm opened this issue 4 years ago • 1 comments

Fixes #109

Description

The Alchemy.Reactions.Emoji.resolve/1 considers only two scenarios:

  • when the emoji is already a struct
  • when the emoji is anything

In this second scenario, this function is building the struct in a wrong way when the paramater is a map. This causes Elixir to crash when it tries to convert the emoji's name to string (this is required to build the url, so Uri can encode it here for example). With this fix, this function will do a proper job when the parameter is a map.

aramsm avatar Sep 23 '20 00:09 aramsm

@cronokirby how are you? I would like to know if you could merge this PR. Also, since the PR fixing the channels did not bring up the project version, I can not pull that update from this lib and my bot is crashing since I have an annoucement channel on my server now. Merging this PR would fix the project version too.

aramsm avatar Nov 01 '20 16:11 aramsm