~singpolyma/cheogram

dd09405ec75a774ae15fbbb7ae8b74d1b8a97236 — Stephen Paul Weber a month ago 69f3bbd
Strip whitespace from possible command invocation
1 files changed, 1 insertions(+), 1 deletions(-)

M Adhoc.hs
M Adhoc.hs => Adhoc.hs +1 -1
@@ 487,7 487,7 @@ adhocBotRunCommand :: (UIO.Unexceptional m) => DB.DB -> JID -> JID -> (XMPP.Mess
adhocBotRunCommand db componentJid routeFrom sendMessage sendIQ getMessage from body cmdEls = do
	let (nodes, cmds) = unzip $ mapMaybe (\el -> (,) <$> fmap mapNode (attributeText (s"node") el) <*> pure el) cmdEls

	case (snd <$> find (\(prefixes, _) -> Set.member (CI.mk body) prefixes) (zip (uniquePrefix nodes) cmds), registerShorthand body) of
	case (snd <$> find (\(prefixes, _) -> Set.member (CI.mk $ T.strip $ body) prefixes) (zip (uniquePrefix nodes) cmds), registerShorthand body) of
		(_, Just gatewayJID) -> do
			mResult <- (atomicUIO =<<) $ UIO.lift $ sendIQ $ (emptyIQ IQSet) {
					iqFrom = Just routeFrom,