Quellcode durchsuchen

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 vor 5 Jahren
Ursprung
Commit
7284adb716
1 geänderte Dateien mit 6 neuen und 2 gelöschten Zeilen
  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);
+        }
     }
 
     /**