summaryrefslogtreecommitdiff
path: root/Assistant/XMPP
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-03-06 16:29:19 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-03-06 16:29:19 -0400
commitdc82128f6f0ffef9f6973baed3ad63d89802c898 (patch)
tree93ff21057d04f9d1c48e4c9e2fa75de092dc1908 /Assistant/XMPP
parent49b88039e597ec761227d00ddf125f8ebe5c6a4f (diff)
tag xmpp pushes with jid
This fixes the issue mentioned in the last commit. Turns out just collecting UUID of clients behind a XMPP remote is insufficient (although I should probably still do it for other reasons), because a single remote repo might be connected via both XMPP and local pairing. So a way is needed to know when a push was received from any client using a given XMPP remote over XMPP, as opposed to via ssh.
Diffstat (limited to 'Assistant/XMPP')
-rw-r--r--Assistant/XMPP/Git.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Assistant/XMPP/Git.hs b/Assistant/XMPP/Git.hs
index b5c8e382c..bdb68eea1 100644
--- a/Assistant/XMPP/Git.hs
+++ b/Assistant/XMPP/Git.hs
@@ -264,7 +264,8 @@ handlePushInitiation (Pushing cid PushRequest) =
<*> getUUID
liftIO $ Command.Sync.updateBranch (Command.Sync.syncBranch branch) g
debug ["pushing to", show rs]
- forM_ rs $ \r -> xmppPush cid $ taggedPush u branch r
+ selfjid <- ((T.unpack <$>) . xmppClientID) <$> getDaemonStatus
+ forM_ rs $ \r -> xmppPush cid $ taggedPush u selfjid branch r
handlePushInitiation (Pushing cid StartingPush) =
whenXMPPRemote cid $
void $ xmppReceivePack cid