Sfoglia il codice sorgente

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

Danilo Bargen 6 anni fa
parent
commit
0e78af5c2a
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  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: