From a626a69771cb1a28e64ccef885acdbda5c096fd4 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 30 Nov 2019 14:09:05 +0100 Subject: [PATCH] Avoid members to be duplicated --- src/controllers/ConversationsController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/ConversationsController.ts b/src/controllers/ConversationsController.ts index 5889c72..7912103 100644 --- a/src/controllers/ConversationsController.ts +++ b/src/controllers/ConversationsController.ts @@ -21,7 +21,7 @@ export class ConversationsController { const name = h.postString("name"); - const members = h.postNumbersList("users"); + const members = [...new Set(h.postNumbersList("users"))]; // Check if the users exists for (const userID of members) {