diff options
author | Joe Crayne <joe@jerkface.net> | 2018-09-10 03:49:15 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2018-09-21 18:18:58 -0400 |
commit | aaa454126c5bccd2e12a156642e130a0b78103e8 (patch) | |
tree | ba3e8fd890968f272a8fcdb302e9e2821390f2a0 | |
parent | 444f4b4ea199d1fda71fdd28c9b1826596214566 (diff) |
xmpp2tox: Cancel status message when appropriate.
-rw-r--r-- | XMPPToTox.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/XMPPToTox.hs b/XMPPToTox.hs index d4da814c..b3372cfc 100644 --- a/XMPPToTox.hs +++ b/XMPPToTox.hs | |||
@@ -103,6 +103,9 @@ presenceToTox = tag' "{jabber:server}presence" | |||
103 | when (not $ USERSTATUS `elem` xs) $ do | 103 | when (not $ USERSTATUS `elem` xs) $ do |
104 | -- Missing <show> element means Available. | 104 | -- Missing <show> element means Available. |
105 | yield $ TwoByte USERSTATUS $ jabberUserStatus Available | 105 | yield $ TwoByte USERSTATUS $ jabberUserStatus Available |
106 | when (not $ STATUSMESSAGE `elem` xs) $ do | ||
107 | -- Missing <status> implies empty status. | ||
108 | yield $ UpToN STATUSMESSAGE mempty | ||
106 | 109 | ||
107 | unknownToTox :: MonadThrow m => | 110 | unknownToTox :: MonadThrow m => |
108 | ConduitM Event CryptoMessage m (Maybe ()) | 111 | ConduitM Event CryptoMessage m (Maybe ()) |