diff options
author | Jacques Comeaux <jacquesrcomeaux@gmail.com> | 2022-05-29 17:00:25 -0500 |
---|---|---|
committer | Jacques Comeaux <jacquesrcomeaux@gmail.com> | 2022-05-29 17:00:25 -0500 |
commit | e970f53fdea63d9dd89382d522db2da570d05128 (patch) | |
tree | ae3b0fc93f00bdb48d235800ddb2fc1ce119947f /src/Tomato/Post.hs | |
parent | 8a765f984d72c12264a2924e7393ac48aa4270ef (diff) |
Use GHC 8.10
Diffstat (limited to 'src/Tomato/Post.hs')
-rw-r--r-- | src/Tomato/Post.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Tomato/Post.hs b/src/Tomato/Post.hs index 4adcdbb..c97860a 100644 --- a/src/Tomato/Post.hs +++ b/src/Tomato/Post.hs @@ -23,12 +23,13 @@ import Network.HTTP.Req , responseBody ) +import Data.HashMap.Strict (insert) + import Tomato.Data.Except (DecodeException (..)) import Tomato.Data.Message (GMIUrl (..), OutMessage (..)) import Tomato.App (App (..)) import qualified Data.Aeson as Ae -import qualified Data.Aeson.KeyMap as Ae import qualified RIO.Text as T @@ -59,7 +60,7 @@ postMessage outMes = do accessToken <- asks appToken let url = https "api.groupme.com" /: "v3" /: "bots" /: "post" outMes' = case Ae.toJSON outMes of - Ae.Object o -> Ae.Object $ Ae.insert "bot_id" (Ae.toJSON botId) o + Ae.Object o -> Ae.Object $ insert "bot_id" (Ae.toJSON botId) o _ -> error "exceptional" rr $ req POST url (ReqBodyJson outMes') ignoreResponse $ header "X-Access-Token" accessToken |