From 51971fc3ae067e10f4cfcc70027afa66c27a10a4 Mon Sep 17 00:00:00 2001 From: Wei Huang Date: Wed, 27 May 2020 09:45:46 +0200 Subject: [PATCH 1/2] Set default for bots,channels,groups,users,ims state It was crashing for me when handle user_change event and the users in Slack.State is nil. --- lib/slack/state.ex | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/slack/state.ex b/lib/slack/state.ex index 131f5ef..e89d3bd 100644 --- a/lib/slack/state.ex +++ b/lib/slack/state.ex @@ -20,11 +20,11 @@ defmodule Slack.State do :token, :me, :team, - :bots, - :channels, - :groups, - :users, - :ims + bots: %{}, + channels: %{}, + groups: %{}, + users: %{}, + ims: %{} ] @doc """ From f75139d187d5956e832512e3e03476cca29d799f Mon Sep 17 00:00:00 2001 From: Wei Huang Date: Wed, 27 May 2020 15:45:10 +0200 Subject: [PATCH 2/2] Bump version --- README.md | 2 +- mix.exs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2f360ea..0181de2 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ def application do end def deps do - [{:slack, "~> 0.23.2"}] + [{:slack, "~> 0.23.3"}] end ``` diff --git a/mix.exs b/mix.exs index 30deac5..809d70d 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule Slack.Mixfile do def project do [ app: :slack, - version: "0.23.2", + version: "0.23.3", elixir: "~> 1.7", elixirc_paths: elixirc_paths(Mix.env()), name: "Slack",