diff options
author | joe <joe@jerkface.net> | 2014-03-05 13:54:14 -0500 |
---|---|---|
committer | joe <joe@jerkface.net> | 2014-03-05 13:54:14 -0500 |
commit | 6bf4115d15dbfafbfa6bf435a1b5674ea2b0a008 (patch) | |
tree | 1b900600778a5afb9cdc4dc239530e9261bf3574 /Presence/XMPPServer.hs | |
parent | 33fea88dca26e3cc8a000ec1c6e043a9759d252c (diff) |
reply to probes (untested)
Diffstat (limited to 'Presence/XMPPServer.hs')
-rw-r--r-- | Presence/XMPPServer.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Presence/XMPPServer.hs b/Presence/XMPPServer.hs index 0103ba46..e66eea70 100644 --- a/Presence/XMPPServer.hs +++ b/Presence/XMPPServer.hs | |||
@@ -183,6 +183,7 @@ data XMPPServerParameters = | |||
183 | , xmppTellClientNameOfPeer :: ConnectionKey -> IO Text | 183 | , xmppTellClientNameOfPeer :: ConnectionKey -> IO Text |
184 | , xmppDeliverMessage :: (IO ()) -> Stanza -> IO () | 184 | , xmppDeliverMessage :: (IO ()) -> Stanza -> IO () |
185 | , xmppInformClientPresence :: ConnectionKey -> Stanza -> IO () | 185 | , xmppInformClientPresence :: ConnectionKey -> Stanza -> IO () |
186 | , xmppAnswerProbe :: ConnectionKey -> Stanza -> TChan Stanza -> IO () | ||
186 | } | 187 | } |
187 | 188 | ||
188 | 189 | ||
@@ -1569,6 +1570,10 @@ monitor sv params xmpp = do | |||
1569 | guard . not . null . mapMaybe (msgBody . snd) $ msgLangMap (stanzaType stanza) | 1570 | guard . not . null . mapMaybe (msgBody . snd) $ msgLangMap (stanzaType stanza) |
1570 | stanzaId stanza | 1571 | stanzaId stanza |
1571 | _ -> return () | 1572 | _ -> return () |
1573 | NetworkOrigin k@(PeerKey {}) replyto -> | ||
1574 | case stanzaType stanza of | ||
1575 | PresenceRequestStatus {} -> do | ||
1576 | xmppAnswerProbe xmpp k stanza replyto | ||
1572 | _ -> return () | 1577 | _ -> return () |
1573 | let deliver replyto = do | 1578 | let deliver replyto = do |
1574 | -- TODO: Issuing RecipientUnavailable for all errors is a presence leak | 1579 | -- TODO: Issuing RecipientUnavailable for all errors is a presence leak |