Browse Source

fix presenceSubscribe(d) stanzas

master
Philipp Balzarek 12 years ago
parent
commit
1e1fbab2f8
  1. 4
      pontarius-xmpp.cabal
  2. 1
      source/Network/Xmpp.hs
  3. 7
      source/Network/Xmpp/Stanza.hs

4
pontarius-xmpp.cabal

@ -1,5 +1,5 @@
Name: pontarius-xmpp Name: pontarius-xmpp
Version: 0.3.0.2 Version: 0.4.0.0
Cabal-Version: >= 1.9.2 Cabal-Version: >= 1.9.2
Build-Type: Custom Build-Type: Custom
License: BSD3 License: BSD3
@ -11,7 +11,7 @@ Maintainer: info@jonkri.com
Stability: alpha Stability: alpha
Homepage: https://github.com/pontarius/pontarius-xmpp/ Homepage: https://github.com/pontarius/pontarius-xmpp/
Bug-Reports: https://github.com/pontarius/pontarius-xmpp/issues/ 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 Synopsis: An XMPP client library
Description: Pontarius XMPP is a work in progress implementation of RFC 6120 Description: Pontarius XMPP is a work in progress implementation of RFC 6120
("XMPP CORE"), RFC 6121 ("XMPP IM"), and RFC 6122 ("XMPP ADDR"). ("XMPP CORE"), RFC 6121 ("XMPP IM"), and RFC 6122 ("XMPP ADDR").

1
source/Network/Xmpp.hs

@ -155,6 +155,7 @@ module Network.Xmpp
, presenceSubscribe , presenceSubscribe
, presenceSubscribed , presenceSubscribed
, presenceUnsubscribe , presenceUnsubscribe
, presenceUnsubscribed
, presTo , presTo
-- *** Sending -- *** Sending
-- | Sends a presence stanza. In general, the presence stanza should have no -- | Sends a presence stanza. In general, the presence stanza should have no

7
source/Network/Xmpp/Stanza.hs

@ -26,6 +26,13 @@ presenceSubscribed to' = presence { presenceTo = Just to'
-- | End a subscription with an entity. -- | End a subscription with an entity.
presenceUnsubscribe :: Jid -> Presence presenceUnsubscribe :: Jid -> Presence
presenceUnsubscribe to' = presence { presenceTo = Just to' presenceUnsubscribe to' = presence { presenceTo = Just to'
, 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 , presenceType = Unsubscribed
} }

Loading…
Cancel
Save