diff options
author | Joey Hess <joey@kitenet.net> | 2013-03-16 15:34:02 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-03-16 15:36:47 -0400 |
commit | e49fedcb95420362ee2c37540e095ba430f64372 (patch) | |
tree | 05f6b7333c105a06d3785a7aa3e78073ddc04009 /Assistant/Threads | |
parent | d6eddd505e7df63c4fa1b96ba7bcab551691d1ff (diff) |
xmpp: send a presence query when there's an important message to send
This may work around google talk's horrible presence handling, in which
clients often don't learn about other clients, at least when using the same
account. This way, every time we start a git push over xmpp, we'll waste
bandwidth asking clients to please try again to identify themselves.
Diffstat (limited to 'Assistant/Threads')
-rw-r--r-- | Assistant/Threads/XMPPClient.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Assistant/Threads/XMPPClient.hs b/Assistant/Threads/XMPPClient.hs index 7d55e4b79..d31bfea6f 100644 --- a/Assistant/Threads/XMPPClient.hs +++ b/Assistant/Threads/XMPPClient.hs @@ -184,7 +184,8 @@ relayNetMessage selfjid = do where handleImportant msg = case parseJID =<< isImportantNetMessage msg of Just tojid - | tojid == baseJID tojid -> + | tojid == baseJID tojid -> do + putStanza presenceQuery storeImportantNetMessage msg (formatJID tojid) $ \c -> (baseJID <$> parseJID c) == Just tojid _ -> noop |