diff --git a/pontarius-xmpp.cabal b/pontarius-xmpp.cabal index 10568cd..bc39597 100644 --- a/pontarius-xmpp.cabal +++ b/pontarius-xmpp.cabal @@ -1,5 +1,5 @@ Name: pontarius-xmpp -Version: 0.3.0.2 +Version: 0.4.0.0 Cabal-Version: >= 1.9.2 Build-Type: Custom License: BSD3 @@ -11,7 +11,7 @@ Maintainer: info@jonkri.com Stability: alpha Homepage: https://github.com/pontarius/pontarius-xmpp/ Bug-Reports: https://github.com/pontarius/pontarius-xmpp/issues/ -Package-URL: http://www.jonkri.com/releases/pontarius-xmpp-0.3.0.2.tar.gz +Package-URL: http://www.jonkri.com/releases/pontarius-xmpp-0.3.0.3.tar.gz Synopsis: An XMPP client library Description: Pontarius XMPP is a work in progress implementation of RFC 6120 ("XMPP CORE"), RFC 6121 ("XMPP IM"), and RFC 6122 ("XMPP ADDR"). diff --git a/source/Network/Xmpp.hs b/source/Network/Xmpp.hs index 0bf327f..00ae251 100644 --- a/source/Network/Xmpp.hs +++ b/source/Network/Xmpp.hs @@ -155,6 +155,7 @@ module Network.Xmpp , presenceSubscribe , presenceSubscribed , presenceUnsubscribe + , presenceUnsubscribed , presTo -- *** Sending -- | Sends a presence stanza. In general, the presence stanza should have no diff --git a/source/Network/Xmpp/Stanza.hs b/source/Network/Xmpp/Stanza.hs index 01aba86..3b7019d 100644 --- a/source/Network/Xmpp/Stanza.hs +++ b/source/Network/Xmpp/Stanza.hs @@ -26,9 +26,16 @@ presenceSubscribed to' = presence { presenceTo = Just to' -- | End a subscription with an entity. presenceUnsubscribe :: Jid -> Presence presenceUnsubscribe to' = presence { presenceTo = Just to' - , presenceType = Unsubscribed + , presenceType = Unsubscribe } +-- | Deny a not-yet approved or terminate a previously approved subscription of +-- an entity +presenceUnsubscribed :: Jid -> Presence +presenceUnsubscribed to' = presence { presenceTo = Just to' + , presenceType = Unsubscribed + } + -- | Signal to the server that the client is available for communication. presenceOnline :: Presence presenceOnline = presence