diff options
author | fiaxh <git@lightrise.org> | 2019-05-12 00:09:50 +0200 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2019-05-16 11:12:14 -0600 |
commit | d3c6e5c62cb405cb6db646ee1ee03ca1e51d5e00 (patch) | |
tree | f304fb028397c668d87651e4e9350c3d009c280c /libdino/src/service/chat_interaction.vala | |
parent | 951be638f6596e9156dd087c310837cfeda242b3 (diff) | |
download | dino-d3c6e5c62cb405cb6db646ee1ee03ca1e51d5e00.tar.gz dino-d3c6e5c62cb405cb6db646ee1ee03ca1e51d5e00.zip |
Enable sending chat state notifications in private rooms
Diffstat (limited to 'libdino/src/service/chat_interaction.vala')
-rw-r--r-- | libdino/src/service/chat_interaction.vala | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libdino/src/service/chat_interaction.vala b/libdino/src/service/chat_interaction.vala index e273cc32..77176d93 100644 --- a/libdino/src/service/chat_interaction.vala +++ b/libdino/src/service/chat_interaction.vala @@ -171,9 +171,13 @@ public class ChatInteraction : StreamInteractionModule, Object { private void send_chat_state_notification(Conversation conversation, string state) { XmppStream stream = stream_interactor.get_stream(conversation.account); - if (stream != null && conversation.get_send_typing_setting() == Conversation.Setting.ON && - conversation.type_ != Conversation.Type.GROUPCHAT) { - stream.get_module(Xep.ChatStateNotifications.Module.IDENTITY).send_state(stream, conversation.counterpart, state); + if (stream != null && conversation.get_send_typing_setting() == Conversation.Setting.ON) { + if (conversation.type_ != Conversation.Type.GROUPCHAT) { + stream.get_module(Xep.ChatStateNotifications.Module.IDENTITY).send_state(stream, conversation.counterpart, Xmpp.MessageStanza.TYPE_CHAT, state); + } + if (stream_interactor.get_module(MucManager.IDENTITY).is_private_room(conversation.account, conversation.counterpart)) { + stream.get_module(Xep.ChatStateNotifications.Module.IDENTITY).send_state(stream, conversation.counterpart, Xmpp.MessageStanza.TYPE_GROUPCHAT, state); + } } } } |