~psycotica0/sgx-dummy

fcab5a58e2a8d9cbf37e79c3061892c316c6182a — Christopher Vollick 1 year, 3 days ago 24d4749
Added Command Without Action

The ad hoc bot defaults to a command with no action for the initial run.
So I need that to work to get anywhere else...
1 files changed, 10 insertions(+), 0 deletions(-)

M gateway.lhs
M gateway.lhs => gateway.lhs +10 -0
@@ 173,6 173,16 @@ And again, handling "previous"
> 	| [_] <- XML.isNamed (s"{http://jabber.org/protocol/commands}command") =<< XML.hasAttributeText (s"node") (s"config" ==) =<< XML.hasAttributeText (s"action") (s"prev" ==) p
> 		= XMPP.putStanza $ iqReply iq $ Just $ XML.documentRoot page1

One more time, this time with no action...

> handleRegister (XMPP.ReceivedIQ iq@XMPP.IQ {
> 	XMPP.iqType = XMPP.IQSet,
> 	XMPP.iqTo = Just XMPP.JID { XMPP.jidNode = Nothing },
> 	XMPP.iqPayload = Just p
> })
> 	| [_] <- XML.isNamed (s"{http://jabber.org/protocol/commands}command") =<< XML.hasAttributeText (s"node") (s"config" ==) p
> 		= XMPP.putStanza $ iqReply iq $ Just $ XML.documentRoot page1

Any other IQ we don't bother with, but should return an error so nothing gets stuck.

> handleRegister (XMPP.ReceivedIQ iq)