diff options
-rw-r--r-- | ToxToXMPP.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ToxToXMPP.hs b/ToxToXMPP.hs index acd1e45b..edbf35ca 100644 --- a/ToxToXMPP.hs +++ b/ToxToXMPP.hs | |||
@@ -80,12 +80,12 @@ dispatch acnt st (OnionRouted theirkey (OnionFriendRequest fr) ) = do | |||
80 | k2c <- Map.filterWithKey (\k _ -> k `Set.member` refs) <$> readTVar (keyToChan st) | 80 | k2c <- Map.filterWithKey (\k _ -> k `Set.member` refs) <$> readTVar (keyToChan st) |
81 | clients <- readTVar (clients st) | 81 | clients <- readTVar (clients st) |
82 | return $ Map.intersectionWith (,) k2c clients | 82 | return $ Map.intersectionWith (,) k2c clients |
83 | -- TODO: Below we're using our nospam (that they used in their friend | 83 | -- TODO: Below we're using a hard coded default as their jabber user id. |
84 | -- request to us) as their jabber user id. This isn't the right thing, but | 84 | -- This isn't the right thing, but we don't know their user-id. Perhaps |
85 | -- we don't know their user-id. Perhaps there should be a way to parse it | 85 | -- there should be a way to parse it out of the friend request text. Maybe |
86 | -- out of the friend request text. Maybe after a zero-termination, or as | 86 | -- after a zero-termination, or as visible text (nospam:...). |
87 | -- visible text (nospam:...). | 87 | let default_nospam = 0x6a7a27fc -- big-endian base64: anon/A== |
88 | let theirjid = key2jid (friendNoSpam fr) theirkey | 88 | theirjid = key2jid default_nospam theirkey |
89 | forM_ k2c $ \(conn,client) -> do | 89 | forM_ k2c $ \(conn,client) -> do |
90 | self <- localJID (clientUser client) (clientProfile client) (clientResource client) | 90 | self <- localJID (clientUser client) (clientProfile client) (clientResource client) |
91 | ask <- presenceSolicitation theirjid self | 91 | ask <- presenceSolicitation theirjid self |