> This should do it, but I have not tested it beyond checking that it > didn't break git-annex's xmpp push. >
Oups, sorry, I did not see your git commit of yesterday. I'm not sure that the <status>git-annex</status> is really a problem for the bandwith, since it is a pretty small message. But of course, it could be good to be able to enable/disable it. I correct my path to not send the status twice in git tunneling...
diff --git a/Assistant/XMPP.hs b/Assistant/XMPP.hs index 3104f84..99fbf7b 100644 --- a/Assistant/XMPP.hs +++ b/Assistant/XMPP.hs @@ -77,21 +77,19 @@ gitAnnexTagInfo v = case extractGitAnnexTag v of {- A presence with a git-annex tag in it. -} gitAnnexPresence :: Element -> Presence -gitAnnexPresence = insertGitAnnexTag $ emptyPresence PresenceAvailable - -{- A presence with an empty git-annex tag in it, used for letting other - - clients know we're around and are a git-annex client. - - - - Also includes a status tag, which may be visible in XMPP clients. - -} -gitAnnexSignature :: Presence -gitAnnexSignature = addStatusTag $ gitAnnexPresence $ Element gitAnnexTagName [] [] +{- Includes a status tag, which may be visible in XMPP clients. -} +gitAnnexPresence = insertGitAnnexTag $ addStatusTag $ emptyPresence PresenceAvailable where addStatusTag p = p { presencePayloads = status : presencePayloads p } status = Element "status" [] [statusMessage] statusMessage = NodeContent $ ContentText $ T.pack "git-annex" +{- A presence with an empty git-annex tag in it, used for letting other + - clients know we're around and are a git-annex client. -} +gitAnnexSignature :: Presence +gitAnnexSignature = gitAnnexPresence $ Element gitAnnexTagName [] [] + {- XMPP client to server ping -} xmppPing :: JID -> IQ xmppPing selfjid = (emptyIQ IQGet)