~singpolyma/cheogram

568afbd2b2d975e1fb8c3dbad4624108cb8bd890 — Stephen Paul Weber 5 months ago be00d4a
Do not show command error on successful cancel
1 files changed, 1 insertions(+), 1 deletions(-)

M Adhoc.hs
M Adhoc.hs => Adhoc.hs +1 -1
@@ 519,7 519,7 @@ adhocBotRunCommand db componentJid routeFrom sendMessage sendIQ getMessage from 
							sendHelp db componentJid sendMessage sendIQ from routeFrom
				| IQResult == iqType resultIQ,
				  [cmd] <- isNamed (s"{http://jabber.org/protocol/commands}command") =<< (justZ $ iqPayload resultIQ),
				  attributeText (s"status") cmd == Just (s"completed") -> return ()
				  attributeText (s"status") cmd `elem` [Just (s"completed"), Just (s"canceled")] -> return ()
				| otherwise -> sendMessage $ mkSMS componentJid from (s"Command error")
			Nothing -> sendMessage $ mkSMS componentJid from (s"Command timed out")