summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ToxToXMPP.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ToxToXMPP.hs b/ToxToXMPP.hs
index 477cfc51..f4a7cbab 100644
--- a/ToxToXMPP.hs
+++ b/ToxToXMPP.hs
@@ -189,13 +189,13 @@ akeyConnect announcer me them = atomically $ do
189-- friend requests. 189-- friend requests.
190checkSoliciting :: PresenceState -> PublicKey -> PublicKey -> Contact -> IO [NoSpam] 190checkSoliciting :: PresenceState -> PublicKey -> PublicKey -> Contact -> IO [NoSpam]
191checkSoliciting presence me them contact = do 191checkSoliciting presence me them contact = do
192 let theirhost = T.pack $ show (key2id them) ++ ".tox"
192 xs <- getBuddiesAndSolicited presence $ \h -> do 193 xs <- getBuddiesAndSolicited presence $ \h -> do
193 -- TODO: /h/ matches hostname? 194 -- TODO: /h/ matches hostname?
194 return False 195 return $ T.toLower h == T.toLower theirhost
195 return $ do 196 return $ do
196 (is_buddy,their_u,my_uid,xmpp_client_profile) <- xs 197 (is_buddy,their_u,my_uid,xmpp_client_profile) <- xs
197 guard $ xmpp_client_profile == "tox" 198 guard $ xmpp_client_profile == "tox"
198 let theirhost = T.pack $ show (key2id them) ++ ".tox"
199 NoSpamId nospam _ <- case fmap T.unpack $ their_u of 199 NoSpamId nospam _ <- case fmap T.unpack $ their_u of
200 Just ('$':_) -> maybeToList $ readMaybe $ T.unpack $ unsplitJID (their_u,theirhost,Nothing) 200 Just ('$':_) -> maybeToList $ readMaybe $ T.unpack $ unsplitJID (their_u,theirhost,Nothing)
201 Just ('0':'x':_) -> maybeToList $ readMaybe $ T.unpack $ unsplitJID (their_u,theirhost,Nothing) 201 Just ('0':'x':_) -> maybeToList $ readMaybe $ T.unpack $ unsplitJID (their_u,theirhost,Nothing)