From 55f20ae099d0f69abcb1fff5e2312df1ce424c15 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 16 Mar 2013 15:34:02 -0400 Subject: [PATCH] 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. --- Assistant/Threads/XMPPClient.hs | 3 ++- debian/changelog | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Assistant/Threads/XMPPClient.hs b/Assistant/Threads/XMPPClient.hs index 7d55e4b79f..d31bfea6f8 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 diff --git a/debian/changelog b/debian/changelog index 6d3c29e4a6..2b22a46c45 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ git-annex (4.20130315) UNRELEASED; urgency=low * webapp: Encourage user to install git-annex on a server when adding a ssh server, rather than just funneling them through to rsync. * xmpp: --debug now enables a sanitized dump of the XMPP protocol + * xmpp: Try harder to detect presence of clients when there's a git push + to send. -- Joey Hess Fri, 15 Mar 2013 00:10:07 -0400