From f9f0e4cdfe35f88d55600c6306e0948ec2521cc7 Mon Sep 17 00:00:00 2001 From: Ivan Ivanov Date: Wed, 1 Nov 2023 13:56:37 +0200 Subject: [PATCH] Downcase twitter handle before checking if it's monitored --- lib/sanbase/monitored_twitter_handle/monitored_twitter_handle.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/sanbase/monitored_twitter_handle/monitored_twitter_handle.ex b/lib/sanbase/monitored_twitter_handle/monitored_twitter_handle.ex index 1d2d60d09c..119b2dc280 100644 --- a/lib/sanbase/monitored_twitter_handle/monitored_twitter_handle.ex +++ b/lib/sanbase/monitored_twitter_handle/monitored_twitter_handle.ex @@ -32,6 +32,7 @@ defmodule Sanbase.MonitoredTwitterHandle do end def is_handle_monitored(handle) do + handle = String.downcase(handle) query = from(m in __MODULE__, where: m.handle == ^handle) {:ok, Repo.exists?(query)}