浏览代码

Only send typing update to contact receivers (#974)

Due to missing type annotations, we sent typing indicators for groups and distribution lists as well, not just for contacts.

This resulted in a logged exception in the Android code.
Danilo Bargen 5 年之前
父节点
当前提交
7284adb716
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      src/partials/messenger.ts

+ 6 - 2
src/partials/messenger.ts

@@ -847,7 +847,9 @@ class ConversationController {
      */
     public startTyping = () => {
         // Notify app
-        this.webClientService.sendMeIsTyping(this.$stateParams, true);
+        if (isContactReceiver(this.receiver)) {
+            this.webClientService.sendMeIsTyping(this.receiver, true);
+        }
     }
 
     /**
@@ -855,7 +857,9 @@ class ConversationController {
      */
     public stopTyping = () => {
         // Notify app
-        this.webClientService.sendMeIsTyping(this.$stateParams, false);
+        if (isContactReceiver(this.receiver)) {
+            this.webClientService.sendMeIsTyping(this.receiver, false);
+        }
     }
 
     /**