Philipp Balzarek 14 years ago
parent
commit
b4dc87eb2c
  1. 10
      src/Network/XMPP/Session.hs

10
src/Network/XMPP/Session.hs

@ -10,11 +10,10 @@ import Network.XMPP.Pickle @@ -10,11 +10,10 @@ import Network.XMPP.Pickle
import Network.XMPP.Types
import Network.XMPP.Concurrent
sessionXML :: Element
sessionXML = pickleElem
(xpElemBlank "{urn:ietf:params:xml:ns:xmpp-session}session" )
()
(xpElemBlank "{urn:ietf:params:xml:ns:xmpp-session}session")
()
sessionIQ :: Stanza
sessionIQ = IQRequestS $ IQRequest { iqRequestID = "sess"
@ -25,6 +24,8 @@ sessionIQ = IQRequestS $ IQRequest { iqRequestID = "sess" @@ -25,6 +24,8 @@ sessionIQ = IQRequestS $ IQRequest { iqRequestID = "sess"
, iqRequestPayload = sessionXML
}
-- Sends the session IQ set element and waits for an answer. Throws an error if
-- if an IQ error stanza is returned from the server.
xmppStartSession :: XMPPConMonad ()
xmppStartSession = do
answer <- xmppSendIQ' "session" Nothing Set Nothing sessionXML
@ -32,7 +33,8 @@ xmppStartSession = do @@ -32,7 +33,8 @@ xmppStartSession = do
Left e -> error $ show e
Right _ -> return ()
-- Sends the session IQ set element and waits for an answer. Throws an error if
-- if an IQ error stanza is returned from the server.
startSession :: XMPP ()
startSession = do
answer <- sendIQ' Nothing Set Nothing sessionXML

Loading…
Cancel
Save