aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJacques Comeaux <jacquesrcomeaux@gmail.com>2022-05-29 17:00:25 -0500
committerJacques Comeaux <jacquesrcomeaux@gmail.com>2022-05-29 17:00:25 -0500
commite970f53fdea63d9dd89382d522db2da570d05128 (patch)
treeae3b0fc93f00bdb48d235800ddb2fc1ce119947f /src
parent8a765f984d72c12264a2924e7393ac48aa4270ef (diff)
Use GHC 8.10
Diffstat (limited to 'src')
-rw-r--r--src/Tomato/Post.hs5
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