diff options
author | Joe Crayne <joe@jerkface.net> | 2018-11-13 16:53:24 -0500 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2018-11-14 01:29:41 -0500 |
commit | 971b23b40e2b519107923dcb6976145e2b83b9cf (patch) | |
tree | 733086bcca436b4726e0507738638f4d06a77b86 /examples/dhtd.hs | |
parent | c2cce27bc86c5aefccc5e2afa9b2063e8c915336 (diff) |
MUC: Two-step nominate/comit chat transactions.
Diffstat (limited to 'examples/dhtd.hs')
-rw-r--r-- | examples/dhtd.hs | 7 |
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 | |||
114 | import qualified Connection.Tcp as Tcp (ConnectionEvent(..),noCleanUp,TCPStatus) | 114 | import qualified Connection.Tcp as Tcp (ConnectionEvent(..),noCleanUp,TCPStatus) |
115 | import DPut | 115 | import DPut |
116 | import DebugTag | 116 | import DebugTag |
117 | import LocalChat | ||
118 | import MUC | ||
117 | 119 | ||
118 | 120 | ||
119 | pshow :: Show a => a -> B.ByteString | 121 | pshow :: 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 | ||