Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

aramsm
Copy link
Contributor

@aramsm aramsm commented Sep 23, 2020

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.

@@ -4,7 +4,7 @@ defmodule Alchemy.Mixfile do
def project do
[
app: :alchemy,
version: "0.6.6",
version: "0.6.8",
Copy link
Contributor Author

@aramsm aramsm Sep 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cronokirby I'm assuming the last PR (#110) was version 0.6.7 so I jumped to 0.6.8 =P

@aramsm
Copy link
Contributor Author

aramsm commented Nov 1, 2020

@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 aramsm force-pushed the fix/reaction-management branch from 4f5c197 to 14a09eb Compare November 4, 2020 18:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] Client.add_reaction/2 and Client.remove_reaction/2 crashes
1 participant