Bläddra i källkod

ARP: Ignore new conversations that already exist in the database. (#862)

Danilo Bargen 6 år sedan
förälder
incheckning
0e78af5c2a
1 ändrade filer med 5 tillägg och 0 borttagningar
  1. 5 0
      src/services/webclient.ts

+ 5 - 0
src/services/webclient.ts

@@ -3113,6 +3113,11 @@ export class WebClientService {
         const type: string = args[WebClientService.ARGUMENT_MODE];
         switch (type) {
             case WebClientService.ARGUMENT_MODE_NEW:
+                if (this.conversations.find(data) !== null) {
+                    this.arpLog.error('Received update/conversation with mode=new for existing conversation');
+                    // Ignore message
+                    break;
+                }
                 this.conversations.add(data);
                 break;
             case WebClientService.ARGUMENT_MODE_MODIFIED: