瀏覽代碼

WebClientService.requestRead: Skip messages without id

Danilo Bargen 7 年之前
父節點
當前提交
0dbe62f83a
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/services/webclient.ts

+ 5 - 0
src/services/webclient.ts

@@ -877,6 +877,11 @@ export class WebClientService {
      * Mark a message as read.
      */
     public requestRead(receiver, newestMessage: threema.Message): void {
+        if (newestMessage.id === undefined) {
+            // Message that hasn't been sent yet
+            return;
+        }
+
         // Create arguments and send request
         const args = {
             [WebClientService.ARGUMENT_RECEIVER_TYPE]: receiver.type,