diff options
Diffstat (limited to 'XMPPToTox.hs')
-rw-r--r-- | XMPPToTox.hs | 7 |
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 () | |||
23 | funnyMessage txt = yield $ UpToN Padding (T.encodeUtf8 txt) | 23 | funnyMessage txt = yield $ UpToN Padding (T.encodeUtf8 txt) |
24 | 24 | ||
25 | sendMsg :: MonadThrow m => Text -> ConduitM i CryptoMessage m () | 25 | sendMsg :: MonadThrow m => Text -> ConduitM i CryptoMessage m () |
26 | sendMsg txt = yield $ UpToN MESSAGE (T.encodeUtf8 txt) | 26 | sendMsg txt = do |
27 | yield $ UpToN MESSAGE (T.encodeUtf8 txt) | ||
28 | yield $ TwoByte TYPING 0 -- Message send implies not typing. | ||
27 | 29 | ||
28 | 30 | ||
29 | eom :: MonadThrow m => ConduitM Event o m () | 31 | eom :: 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 |