~singpolyma/cheogram

fb5019914a847b843852ecf2be9b5c793a53b080 — Stephen Paul Weber 8 years ago 0bd96cd
Show error message in log
1 files changed, 1 insertions(+), 0 deletions(-)

M Main.hs
M Main.hs => Main.hs +1 -0
@@ 147,6 147,7 @@ code str status =
	hasAttributeText (fromString "code") (== fromString str) status

componentMessage _ toVitelity _ (m@Message { messageType = MessageError }) _ _ _ tel body = do
	print m
	let errorTxt = fmap (mconcat . elementText) $ listToMaybe $
		isNamed (fromString "{urn:ietf:params:xml:ns:xmpp-stanzas}text") =<<
		elementChildren =<< isNamed (fromString "{jabber:component:accept}error") =<< messagePayloads m