diff options
author | 2012-10-28 17:07:29 -0400 | |
---|---|---|
committer | 2012-10-28 17:07:29 -0400 | |
commit | b64f43388c7b2c69ec0e930553363d6a419d2f45 (patch) | |
tree | a443cd05e1e14e8a79760d0ae2f035f90e190e33 /Assistant/Threads | |
parent | cb5d8cea0c8b36a87954625add50477a74b06fe4 (diff) |
send git-annex tag in initial presence
Will be used for finding other git-annex clients for pairing
Diffstat (limited to 'Assistant/Threads')
-rw-r--r-- | Assistant/Threads/PushNotifier.hs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Assistant/Threads/PushNotifier.hs b/Assistant/Threads/PushNotifier.hs index f6058b465..dc7099e3d 100644 --- a/Assistant/Threads/PushNotifier.hs +++ b/Assistant/Threads/PushNotifier.hs @@ -46,6 +46,7 @@ pushNotifierThread st dstatus pushnotifier = NamedThread thisThread $ void $ connectXMPP c $ \jid -> do fulljid <- bindJID jid liftIO $ debug thisThread ["XMPP connected", show fulljid] + putStanza $ gitAnnexPresence gitAnnexSignature s <- getSession _ <- liftIO $ forkIO $ void $ runXMPP s $ receivenotifications @@ -62,10 +63,7 @@ pushNotifierThread st dstatus pushnotifier = NamedThread thisThread $ sendnotifications = forever $ do us <- liftIO $ waitPush pushnotifier - let payload = [extendedAway, encodePushNotification us] - let notification = (emptyPresence PresenceAvailable) - { presencePayloads = payload } - putStanza notification + putStanza $ gitAnnexPresence $ encodePushNotification us receivenotifications = forever $ do s <- getStanza |