From 0bdbb7e4d351c66238ef4e39d3a6ef7828c19be1 Mon Sep 17 00:00:00 2001 From: joe Date: Thu, 31 May 2018 20:00:35 -0400 Subject: Use hard-coded default nospam id. --- ToxToXMPP.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ToxToXMPP.hs') 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 k2c <- Map.filterWithKey (\k _ -> k `Set.member` refs) <$> readTVar (keyToChan st) clients <- readTVar (clients st) return $ Map.intersectionWith (,) k2c clients - -- TODO: Below we're using our nospam (that they used in their friend - -- request to us) as their jabber user id. This isn't the right thing, but - -- we don't know their user-id. Perhaps there should be a way to parse it - -- out of the friend request text. Maybe after a zero-termination, or as - -- visible text (nospam:...). - let theirjid = key2jid (friendNoSpam fr) theirkey + -- TODO: Below we're using a hard coded default as their jabber user id. + -- This isn't the right thing, but we don't know their user-id. Perhaps + -- there should be a way to parse it out of the friend request text. Maybe + -- after a zero-termination, or as visible text (nospam:...). + let default_nospam = 0x6a7a27fc -- big-endian base64: anon/A== + theirjid = key2jid default_nospam theirkey forM_ k2c $ \(conn,client) -> do self <- localJID (clientUser client) (clientProfile client) (clientResource client) ask <- presenceSolicitation theirjid self -- cgit v1.2.3