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. 9
      source/Network/Xmpp/Stanza.hs

4
pontarius-xmpp.cabal

@ -1,5 +1,5 @@ @@ -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 @@ -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").

1
source/Network/Xmpp.hs

@ -155,6 +155,7 @@ module Network.Xmpp @@ -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

9
source/Network/Xmpp/Stanza.hs

@ -26,9 +26,16 @@ presenceSubscribed to' = presence { presenceTo = Just to' @@ -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

Loading…
Cancel
Save