From d89a0a3d028947df10d72a9bc1577ef615513d3d Mon Sep 17 00:00:00 2001 From: joe Date: Sun, 24 Jun 2018 04:54:19 -0400 Subject: Added tox-id annotation to tox peer connections. --- examples/dhtd.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'examples/dhtd.hs') diff --git a/examples/dhtd.hs b/examples/dhtd.hs index 7aa5cd2c..3d6b5f7b 100644 --- a/examples/dhtd.hs +++ b/examples/dhtd.hs @@ -1547,11 +1547,12 @@ announceToxJabberPeer :: PublicKey -- ^ This node's long-term user key. announceToxJabberPeer me them echan laddr saddr pingflag tsrc tsnk = do atomically $ writeTChan echan - ( (saddr, ConnectionData (Left (Local laddr)) XMPPServer.Tox ) + ( (saddr, ConnectionData (Left (Local laddr)) XMPPServer.Tox (toHostname me) ) , Tcp.Connection pingflag xsrc xsnk ) return Nothing where - xsrc = tsrc =$= toxToXmpp laddr me (T.pack $ show (Tox.key2id them) ++ ".tox") + toHostname k = T.pack $ show (Tox.key2id k) ++ ".tox" + xsrc = tsrc =$= toxToXmpp laddr me (toHostname them) xsnk = flushPassThrough xmppToTox =$= tsnk vShowMe :: Tox.ViewSnapshot -> Int -> B.ByteString -- cgit v1.2.3