~singpolyma/cheogram

35f84748349f034790411655328f8912941c1f9f — Stephen Paul Weber 5 months ago a3f3820
If backend cancels the flow, cancel the session and do not save
1 files changed, 1 insertions(+), 0 deletions(-)

M ConfigureDirectMessageRoute.hs
M ConfigureDirectMessageRoute.hs => ConfigureDirectMessageRoute.hs +1 -0
@@ 241,6 241,7 @@ stage2 componentDomain sid iqID from command

proxyAdHocFromGateway :: Text -> XMPP.JID -> Session
proxyAdHocFromGateway prevIqID userJid _ sid iqID from command
	| attributeText (s"status") command == Just (s"canceled") = (SessionCancel, proxied)
	| attributeText (s"status") command == Just (s"completed") =
		if (s"error") `elem` mapMaybe (attributeText (s"type")) (XML.isNamed (s"{http://jabber.org/protocol/commands}note") =<< XML.elementChildren command) then
			(SessionCancel, proxied)