diff --git a/source/Network/Xmpp.hs b/source/Network/Xmpp.hs index 28ceb44..e92579b 100644 --- a/source/Network/Xmpp.hs +++ b/source/Network/Xmpp.hs @@ -83,6 +83,7 @@ module Network.Xmpp -- or IQ stanza. , getStanza , getStanzaChan + , newStanzaID -- ** Messages -- | The /message/ stanza is a /push/ mechanism whereby one entity -- pushes information to another entity, similar to the communications that diff --git a/source/Network/Xmpp/Concurrent.hs b/source/Network/Xmpp/Concurrent.hs index b883fef..0ba3035 100644 --- a/source/Network/Xmpp/Concurrent.hs +++ b/source/Network/Xmpp/Concurrent.hs @@ -12,6 +12,7 @@ module Network.Xmpp.Concurrent , newSession , writeWorker , session + , newStanzaID ) where import Control.Applicative((<$>),(<*>)) @@ -182,3 +183,7 @@ session realm mbSasl config = runErrorT $ do ses <- ErrorT $ newSession stream config liftIO $ when (enableRoster config) $ initRoster ses return ses + +newStanzaID :: Session -> IO StanzaID +newStanzaID = idGenerator +