aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/counterpart_interaction_manager.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-05-12 00:09:50 +0200
committerfiaxh <git@lightrise.org>2019-05-16 11:12:14 -0600
commitd3c6e5c62cb405cb6db646ee1ee03ca1e51d5e00 (patch)
treef304fb028397c668d87651e4e9350c3d009c280c /libdino/src/service/counterpart_interaction_manager.vala
parent951be638f6596e9156dd087c310837cfeda242b3 (diff)
downloaddino-d3c6e5c62cb405cb6db646ee1ee03ca1e51d5e00.tar.gz
dino-d3c6e5c62cb405cb6db646ee1ee03ca1e51d5e00.zip
Enable sending chat state notifications in private rooms
Diffstat (limited to 'libdino/src/service/counterpart_interaction_manager.vala')
-rw-r--r--libdino/src/service/counterpart_interaction_manager.vala8
1 files changed, 8 insertions, 0 deletions
diff --git a/libdino/src/service/counterpart_interaction_manager.vala b/libdino/src/service/counterpart_interaction_manager.vala
index 68589003..7da65650 100644
--- a/libdino/src/service/counterpart_interaction_manager.vala
+++ b/libdino/src/service/counterpart_interaction_manager.vala
@@ -52,6 +52,14 @@ public class CounterpartInteractionManager : StreamInteractionModule, Object {
Conversation? conversation = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation_for_message(message);
if (conversation == null) return;
+ // Don't show our own typing notification in MUCs
+ if (conversation.type_ == Conversation.Type.GROUPCHAT) {
+ Jid? own_muc_jid = stream_interactor.get_module(MucManager.IDENTITY).get_own_jid(jid.bare_jid, account);
+ if (own_muc_jid != null && own_muc_jid.equals(jid)) {
+ return;
+ }
+ }
+
if (!chat_states.has_key(conversation)) {
chat_states[conversation] = new HashMap<Jid, string>(Jid.hash_func, Jid.equals_func);
}