Update calls of Enum.member?/1 to be 'x in y' instead

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-08-11 16:00:09 -07:00
parent 1f574dd0eb
commit 906a20bda1
2 changed files with 3 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ defmodule Omnibot.Core do
if nick == cfg.nick do
add_channel(channel)
# Sync if we join a channel we shouldn't be in
if !Enum.member?(Config.all_channels(cfg), channel),
if channel in Config.all_channels(cfg),
do: sync_channels(irc)
end
end
@@ -21,7 +21,7 @@ defmodule Omnibot.Core do
if nick == cfg.nick do
remove_channel(channel)
# Sync if we join a channel we forcibly part a channel we shouldn't leave
if Enum.member?(Config.all_channels(cfg), channel),
if channel in Config.all_channels(cfg),
do: sync_channels(irc)
end
end