~singpolyma/cheogram

e5e7ce19a64ef016e4e5fb8560bcbf34cd3dc1f7 — Stephen Paul Weber 5 months ago 96e1ae1
Tell the user what the actions are when waiting at a note
1 files changed, 3 insertions(+), 0 deletions(-)

M Adhoc.hs
M Adhoc.hs => Adhoc.hs +3 -0
@@ 501,6 501,9 @@ adhocBotRunCommand db componentJid routeFrom sendMessage sendIQ getMessage from 
					if (attributeText (s"status") payload == Just (s"executing")) then do
						let actions = mapMaybe (actionFromXMPP . XML.nameLocalName . elementName) $ elementChildren =<< isNamed (s"{http://jabber.org/protocol/commands}actions") =<< elementChildren payload
						let sessionid = maybe [] (\sessid -> [(s"sessionid", [ContentText sessid])]) $ attributeText (s"sessionid") payload
						sendText $
							s"You can say one of: " ++
							(intercalate (s", ") $ map actionCmd (ActionCancel : actions))
						action <- waitForAction actions sendText (atomicUIO getMessage)
						let cmdIQ' = (emptyIQ IQSet) {
							iqFrom = Just routeFrom,