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 02dd5134..d9cacb4c 100644
--- a/Presence/XMPPServer.hs
+++ b/Presence/XMPPServer.hs
@@ -24,6 +24,7 @@ module XMPPServer
24 , presenceSolicitation 24 , presenceSolicitation
25 , makePresenceStanza 25 , makePresenceStanza
26 , makeInformSubscription 26 , makeInformSubscription
27 , makeRosterUpdate
27 , JabberShow(..) 28 , JabberShow(..)
28 ) where 29 ) where
29 30
@@ -794,6 +795,20 @@ makePresenceStanza namespace mjid pstat = do
794 , EventContent (ContentText stat) 795 , EventContent (ContentText stat)
795 , EventEndElement "{jabber:client}show" ] 796 , EventEndElement "{jabber:client}show" ]
796 797
798makeRosterUpdate tojid contact relationship = do
799 let attrs = [attr "subscription" relationship]
800 stanzaFromList Unrecognized
801 [ EventBeginElement "{jabber:client}iq"
802 [ attr "to" tojid
803 , attr "id" "someid"
804 , attr "type" "set"
805 ]
806 , EventBeginElement "{jabber:iq:roster}query" []
807 , EventBeginElement "{jabber:iq:roster}item" (attr "jid" contact : attrs)
808 , EventEndElement "{jabber:iq:roster}item"
809 , EventEndElement "{jabber:iq:roster}query"
810 , EventEndElement "{jabber:client}iq"
811 ]
797 812
798makePong :: Text -> Maybe Text -> Text -> Text -> [XML.Event] 813makePong :: Text -> Maybe Text -> Text -> Text -> [XML.Event]
799makePong namespace mid to from = 814makePong namespace mid to from =