summaryrefslogtreecommitdiff
path: root/Presence
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2014-02-16 17:37:39 -0500
committerjoe <joe@jerkface.net>2014-02-16 17:37:39 -0500
commit0cb2c11613208cbeb8fb012b63b05b8ea4d6da84 (patch)
tree1cb92fe4415fd2174faa138292e1ae76a52a529e /Presence
parent585e8aca57f0fdb09dd6cf42cb67af23448cdc6a (diff)
xmppDeliverMessage
Diffstat (limited to 'Presence')
-rw-r--r--Presence/XMPPServer.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Presence/XMPPServer.hs b/Presence/XMPPServer.hs
index d3df48d0..4c87ba65 100644
--- a/Presence/XMPPServer.hs
+++ b/Presence/XMPPServer.hs
@@ -7,6 +7,7 @@ module XMPPServer
7 , StanzaType(..) 7 , StanzaType(..)
8 , StanzaOrigin(..) 8 , StanzaOrigin(..)
9 , cloneStanza 9 , cloneStanza
10 , LangSpecificMessage(..)
10 ) where 11 ) where
11import Debug.Trace 12import Debug.Trace
12import Control.Monad.Trans.Resource (runResourceT) 13import Control.Monad.Trans.Resource (runResourceT)
@@ -129,6 +130,7 @@ data XMPPServerParameters =
129 , xmppRosterOthers :: ConnectionKey -> IO [Text] 130 , xmppRosterOthers :: ConnectionKey -> IO [Text]
130 , xmppLookupClientJID :: ConnectionKey -> IO Text 131 , xmppLookupClientJID :: ConnectionKey -> IO Text
131 , xmppLookupPeerName :: ConnectionKey -> IO Text 132 , xmppLookupPeerName :: ConnectionKey -> IO Text
133 , xmppDeliverMessage :: (IO ()) -> Stanza -> IO ()
132 } 134 }
133 135
134-- TODO: http://xmpp.org/rfcs/rfc6120.html#rules-remote-error 136-- TODO: http://xmpp.org/rfcs/rfc6120.html#rules-remote-error
@@ -835,6 +837,9 @@ monitor sv params xmpp = do
835 sendReply quitVar Pong reply replyto 837 sendReply quitVar Pong reply replyto
836 RequestRoster -> 838 RequestRoster ->
837 sendRoster stanza xmpp replyto 839 sendRoster stanza xmpp replyto
840 Message {} -> do
841 let fail = return () -- todo
842 xmppDeliverMessage xmpp fail stanza
838 UnrecognizedQuery query -> do 843 UnrecognizedQuery query -> do
839 let reply = iq_service_unavailable (stanzaId stanza) "localhost" query 844 let reply = iq_service_unavailable (stanzaId stanza) "localhost" query
840 sendReply quitVar Error reply replyto 845 sendReply quitVar Error reply replyto