summaryrefslogtreecommitdiff
path: root/XMPPToTox.hs
diff options
context:
space:
mode:
Diffstat (limited to 'XMPPToTox.hs')
-rw-r--r--XMPPToTox.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/XMPPToTox.hs b/XMPPToTox.hs
index 7ca4330e..ae9a774b 100644
--- a/XMPPToTox.hs
+++ b/XMPPToTox.hs
@@ -23,7 +23,9 @@ funnyMessage :: MonadThrow m => Text -> ConduitM i CryptoMessage m ()
23funnyMessage txt = yield $ UpToN Padding (T.encodeUtf8 txt) 23funnyMessage txt = yield $ UpToN Padding (T.encodeUtf8 txt)
24 24
25sendMsg :: MonadThrow m => Text -> ConduitM i CryptoMessage m () 25sendMsg :: MonadThrow m => Text -> ConduitM i CryptoMessage m ()
26sendMsg txt = yield $ UpToN MESSAGE (T.encodeUtf8 txt) 26sendMsg txt = do
27 yield $ UpToN MESSAGE (T.encodeUtf8 txt)
28 yield $ TwoByte TYPING 0 -- Message send implies not typing.
27 29
28 30
29eom :: MonadThrow m => ConduitM Event o m () 31eom :: MonadThrow m => ConduitM Event o m ()
@@ -42,6 +44,9 @@ msgToTox = tag' "{jabber:server}message"
42 , tagIgnoreAttrs "{http://jabber.org/protocol/chatstates}composing" 44 , tagIgnoreAttrs "{http://jabber.org/protocol/chatstates}composing"
43 $ do yield $ TwoByte TYPING 1 45 $ do yield $ TwoByte TYPING 1
44 eom 46 eom
47 , tagIgnoreAttrs "{http://jabber.org/protocol/chatstates}active"
48 $ do yield $ TwoByte TYPING 0
49 eom
45 , tagIgnoreAttrs "{http://jabber.org/protocol/chatstates}paused" 50 , tagIgnoreAttrs "{http://jabber.org/protocol/chatstates}paused"
46 $ do yield $ TwoByte TYPING 0 51 $ do yield $ TwoByte TYPING 0
47 eom 52 eom