From 1f679837dcc881b4de211d55234ad793815ed26b Mon Sep 17 00:00:00 2001 From: joe Date: Mon, 17 Jun 2013 00:14:13 -0400 Subject: minor clean up --- Presence/XMPPServer.hs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Presence/XMPPServer.hs b/Presence/XMPPServer.hs index ba542909..ace36f80 100644 --- a/Presence/XMPPServer.hs +++ b/Presence/XMPPServer.hs @@ -97,14 +97,14 @@ astring (AttValue [Left s]) = [s] tagcontent tag content = Prelude.concatMap (\(CElem (Elem _ _ c) _)->c) $ Prelude.filter (bindElem tag) content -iqresult host id (Just rsrc) = L.unlines $ +iq_bind_reply id jid = L.unlines $ [ "" , "" - , "" <++> id <++> "@" <++> host <++> "/" <++> rsrc <++> "" + , "" <++> jid <++> "" , "" , " " ] -iqresult host id Nothing = L.unlines $ +iq_session_reply host id = L.unlines $ [ " "@" <++> host <++> "/" <++> pack rsrc + Just $ iq_bind_reply id jid ) (do guard (hasElem "session" content) - Just (iqresult host id Nothing)) + Just (iq_session_reply host id)) "get" -> {- trace ("iq-get "++show (attrs,content)) $ -} do (tag,as) <- lookup (N "xmlns") (anytagattrs content) -- cgit v1.2.3