From 6070421019832c94e48b988ac996bf99cf3ccd5f Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Tue, 21 Apr 2026 02:51:31 -0400 Subject: fig-monitor-twitch: Send username in addition to display name --- fig-monitor-twitch/src/Fig/Monitor/Twitch/Chatbot.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fig-monitor-twitch/src/Fig/Monitor/Twitch/Chatbot.hs b/fig-monitor-twitch/src/Fig/Monitor/Twitch/Chatbot.hs index 92f6830..4886ffb 100644 --- a/fig-monitor-twitch/src/Fig/Monitor/Twitch/Chatbot.hs +++ b/fig-monitor-twitch/src/Fig/Monitor/Twitch/Chatbot.hs @@ -46,10 +46,11 @@ twitchChatbot cfg busAddr = do cmds.publish "fig monitor twitch chat user-notice" . encodeUtf8 $ Text.unwords msg.params "PRIVMSG" | Just displaynm <- Map.lookup "display-name" msg.tags + , Just pfx <- msg.prefix , Nothing <- Map.lookup "custom-reward-id" msg.tags -> do log $ "Received chat message from: " <> displaynm cmds.publish "fig monitor twitch chat incoming" . encodeUtf8 . Text.unwords $ - [ displaynm + [ displaynm, "\t", fst $ Text.breakOn "!" pfx , Text.intercalate "\n" $ (\(key, v) -> key <> "\t" <> v) <$> Map.toList msg.tags ] <> drop 1 msg.params _ -> pure () -- cgit v1.2.3