summaryrefslogtreecommitdiff
path: root/Presence/XMPPServer.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Presence/XMPPServer.hs')
-rw-r--r--Presence/XMPPServer.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/Presence/XMPPServer.hs b/Presence/XMPPServer.hs
index 5dda4f4d..b895597f 100644
--- a/Presence/XMPPServer.hs
+++ b/Presence/XMPPServer.hs
@@ -19,6 +19,8 @@ module XMPPServer
19 , addrToText 19 , addrToText
20 , sendModifiedStanzaToPeer 20 , sendModifiedStanzaToPeer
21 , sendModifiedStanzaToClient 21 , sendModifiedStanzaToClient
22 , presenceProbe
23 , presenceSolicitation
22 ) where 24 ) where
23 25
24import Debug.Trace 26import Debug.Trace
@@ -1025,6 +1027,19 @@ simulateChatError err mfrom =
1025 ] 1027 ]
1026 1028
1027 1029
1030presenceSolicitation = presenceStanza (PresenceRequestSubscription True) "subscribe"
1031
1032presenceProbe = presenceStanza PresenceRequestStatus "probe"
1033
1034presenceStanza stanza_type type_attr me jid =
1035 stanzaFromList stanza_type
1036 [ EventBeginElement "{jabber:server}presence"
1037 [ attr "to" jid
1038 , attr "from" me
1039 , attr "type" type_attr
1040 ]
1041 , EventEndElement "{jabber:server}presence" ]
1042
1028forkConnection :: Server ConnectionKey SockAddr 1043forkConnection :: Server ConnectionKey SockAddr
1029 -> XMPPServerParameters 1044 -> XMPPServerParameters
1030 -> ConnectionKey 1045 -> ConnectionKey