summaryrefslogtreecommitdiff
path: root/examples/dhtd.hs
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2018-11-13 16:53:24 -0500
committerJoe Crayne <joe@jerkface.net>2018-11-14 01:29:41 -0500
commit971b23b40e2b519107923dcb6976145e2b83b9cf (patch)
tree733086bcca436b4726e0507738638f4d06a77b86 /examples/dhtd.hs
parentc2cce27bc86c5aefccc5e2afa9b2063e8c915336 (diff)
MUC: Two-step nominate/comit chat transactions.
Diffstat (limited to 'examples/dhtd.hs')
-rw-r--r--examples/dhtd.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/dhtd.hs b/examples/dhtd.hs
index 27403971..5279ea54 100644
--- a/examples/dhtd.hs
+++ b/examples/dhtd.hs
@@ -114,6 +114,8 @@ import XMPPToTox
114import qualified Connection.Tcp as Tcp (ConnectionEvent(..),noCleanUp,TCPStatus) 114import qualified Connection.Tcp as Tcp (ConnectionEvent(..),noCleanUp,TCPStatus)
115import DPut 115import DPut
116import DebugTag 116import DebugTag
117import LocalChat
118import MUC
117 119
118 120
119pshow :: Show a => a -> B.ByteString 121pshow :: Show a => a -> B.ByteString
@@ -1517,7 +1519,10 @@ initJabber opts ssvar announcer mbtox toxdhts = case portxmpp opts of
1517 tcp <- xmppConnections sv -- :: IO ( Manager TCPStatus T.Text ) 1519 tcp <- xmppConnections sv -- :: IO ( Manager TCPStatus T.Text )
1518 let tman = toxman ssvar announcer toxbkts <$> mbtox 1520 let tman = toxman ssvar announcer toxbkts <$> mbtox
1519 state <- newPresenceState cw tman sv (selectManager tman tcp) 1521 state <- newPresenceState cw tman sv (selectManager tman tcp)
1520 forkXmpp sv (presenceHooks state (verbosity opts) (Just cport) (Just sport)) 1522 chat <- atomically newMUC
1523 quitChatService <- forkLocalChat chat
1524 let chats = Map.singleton "chat" chat
1525 forkXmpp sv (presenceHooks state chats (verbosity opts) (Just cport) (Just sport))
1521 conns <- xmppConnections sv 1526 conns <- xmppConnections sv
1522 return (Just sv, Just conns, Just state) 1527 return (Just sv, Just conns, Just state)
1523 1528