diff options
author | joe <joe@jerkface.net> | 2018-06-24 04:54:19 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2018-06-24 04:54:19 -0400 |
commit | d89a0a3d028947df10d72a9bc1577ef615513d3d (patch) | |
tree | cbf86b8ddaf19d19d1ff38ac6a1cff21c825d036 /examples/dhtd.hs | |
parent | 55db1198b3da0c706f2b9f1ed9c8fd11fc4ae552 (diff) |
Added tox-id annotation to tox peer connections.
Diffstat (limited to 'examples/dhtd.hs')
-rw-r--r-- | examples/dhtd.hs | 5 |
1 files changed, 3 insertions, 2 deletions
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. | |||
1547 | announceToxJabberPeer me them echan laddr saddr pingflag tsrc tsnk | 1547 | announceToxJabberPeer me them echan laddr saddr pingflag tsrc tsnk |
1548 | = do | 1548 | = do |
1549 | atomically $ writeTChan echan | 1549 | atomically $ writeTChan echan |
1550 | ( (saddr, ConnectionData (Left (Local laddr)) XMPPServer.Tox ) | 1550 | ( (saddr, ConnectionData (Left (Local laddr)) XMPPServer.Tox (toHostname me) ) |
1551 | , Tcp.Connection pingflag xsrc xsnk ) | 1551 | , Tcp.Connection pingflag xsrc xsnk ) |
1552 | return Nothing | 1552 | return Nothing |
1553 | where | 1553 | where |
1554 | xsrc = tsrc =$= toxToXmpp laddr me (T.pack $ show (Tox.key2id them) ++ ".tox") | 1554 | toHostname k = T.pack $ show (Tox.key2id k) ++ ".tox" |
1555 | xsrc = tsrc =$= toxToXmpp laddr me (toHostname them) | ||
1555 | xsnk = flushPassThrough xmppToTox =$= tsnk | 1556 | xsnk = flushPassThrough xmppToTox =$= tsnk |
1556 | 1557 | ||
1557 | vShowMe :: Tox.ViewSnapshot -> Int -> B.ByteString | 1558 | vShowMe :: Tox.ViewSnapshot -> Int -> B.ByteString |