switch to directed presence for pair requests
Testing between Google Talk and prosody, the directed IQ messages were not received. Google Talk probably only relays them between clients using the same account. I first tried even more directed presence, with each client JID being sent a separate presence, but that didn't work on Google Talk, particularly it was ignored when one client sent it to another client using the same account. So, presence directed at the user@host of the client to pair with. Tested working between Google Talk and prosody (in both directions), as well as between two clients with the same account on Google Talk, and two clients with the same account on prosody. Only problem with this form of directed presence is that if I also use it for git pushes, more clients than are interested in a push's data will receive it. So I may need some better approach, or a hybrid between directed IQ and directed presence.
This commit is contained in:
parent
5108d4b364
commit
17e84a8096
4 changed files with 44 additions and 40 deletions
|
@ -89,13 +89,11 @@ getStartXMPPPairR bid = do
|
|||
(Just []) -> redirect StartPairR
|
||||
(Just clients@((Client exemplar):_)) -> do
|
||||
let samejid = basejid ourjid == basejid exemplar
|
||||
liftAssistant $ forM_ clients $ \(Client jid) ->
|
||||
unless (jid == ourjid) $ do
|
||||
u <- liftAnnex getUUID
|
||||
sendNetMessage $ PairingNotification
|
||||
PairReq (formatJID jid) u
|
||||
let account = formatJID $ basejid exemplar
|
||||
liftAssistant $ do
|
||||
u <- liftAnnex getUUID
|
||||
sendNetMessage $ PairingNotification PairReq account u
|
||||
pairPage $ do
|
||||
let account = formatJID $ basejid exemplar
|
||||
let name = buddyName exemplar
|
||||
$(widgetFile "configurators/pairing/xmpp/inprogress")
|
||||
where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue