summaryrefslogtreecommitdiff
path: root/examples/dhtd.hs
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2018-07-05 21:47:28 -0400
committerJoe Crayne <joe@jerkface.net>2018-07-05 21:48:09 -0400
commit3e451443ea432a0c5c3ed1f85953188529c1a754 (patch)
tree806785ce62fe21b56b0b2bf4c850cf91d4fde1cc /examples/dhtd.hs
parent93bfd69110df060a9c8ec6c194e0d30553d6e20d (diff)
Use ordinary (.tox) hostnames in JIDs from Tox peers to clients.
Diffstat (limited to 'examples/dhtd.hs')
-rw-r--r--examples/dhtd.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/dhtd.hs b/examples/dhtd.hs
index 7ed77d3a..fff7a98b 100644
--- a/examples/dhtd.hs
+++ b/examples/dhtd.hs
@@ -1565,12 +1565,11 @@ announceToxJabberPeer :: PublicKey -- ^ This node's long-term user key.
1565announceToxJabberPeer me them echan laddr saddr pingflag tsrc tsnk 1565announceToxJabberPeer me them echan laddr saddr pingflag tsrc tsnk
1566 = do 1566 = do
1567 atomically $ writeTChan echan 1567 atomically $ writeTChan echan
1568 ( (saddr, ConnectionData (Left (Local laddr)) XMPPServer.Tox (toHostname me) ) 1568 ( (saddr, ConnectionData (Left (Local laddr)) XMPPServer.Tox (xmppHostname me) )
1569 , Tcp.Connection pingflag xsrc xsnk ) 1569 , Tcp.Connection pingflag xsrc xsnk )
1570 return Nothing 1570 return Nothing
1571 where 1571 where
1572 toHostname k = T.pack $ show (Tox.key2id k) ++ ".tox" 1572 xsrc = tsrc =$= toxToXmpp laddr me (xmppHostname them)
1573 xsrc = tsrc =$= toxToXmpp laddr me (toHostname them)
1574 xsnk = flushPassThrough xmppToTox =$= tsnk 1573 xsnk = flushPassThrough xmppToTox =$= tsnk
1575 1574
1576vShowMe :: Tox.ViewSnapshot -> Int -> B.ByteString 1575vShowMe :: Tox.ViewSnapshot -> Int -> B.ByteString