~singpolyma/cheogram

683231a62e4a5721738059c4cbe3e6553f808475 — Stephen Paul Weber 7 years ago 001d32c
Hack to pass through some kind of error at least
1 files changed, 6 insertions(+), 1 deletions(-)

M ConfigureDirectMessageRoute.hs
M ConfigureDirectMessageRoute.hs => ConfigureDirectMessageRoute.hs +6 -1
@@ 54,7 54,12 @@ processOneIQ getRouteJid setRouteJid sessions iq@(XMPP.IQ { XMPP.iqID = Just iqI
		existingRoute <- getRouteJid from
		return (Map.insert sid (session, now) sessions, stage1 existingRoute from iqID sid)
	where
	payload = fromMaybe (Element (s"no-payload") [] []) realPayload
	payload
		| Just p <- realPayload,
		  XMPP.iqType iq == XMPP.IQError && elementName p == s"{jabber:component:accept}error" = p
		| XMPP.iqType iq == XMPP.IQError =
			let Just p = XMPP.iqPayload $ iqError Nothing Nothing "cancel" "internal-server-error" Nothing in p
		| otherwise = fromMaybe (Element (s"no-payload") [] []) realPayload
processOneIQ _ _ sessions iq@(XMPP.IQ { XMPP.iqID = iqID, XMPP.iqFrom = from }) = do
	log "ConfigureDirectMessageRoute.processOneIQ BAD INPUT" iq
	return (sessions, iqError iqID from "cancel" "feature-not-implemented" Nothing)