From 42f73f84fd4ff69b41d6111bd5aef417c0821ca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D0=BC=D0=B8=D1=80=20=D0=A4?= =?UTF-8?q?=D0=B5=D0=B4=D0=BE=D1=80=D0=BE=D0=B2?= Date: Mon, 25 Apr 2022 02:59:44 +0700 Subject: [PATCH] fix AddUserInChat --- db/db.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/db.go b/db/db.go index 13b6ca3..66c2ac5 100644 --- a/db/db.go +++ b/db/db.go @@ -57,7 +57,7 @@ func AddUserInChat(chatID int64, username string) error { _, err = collection.UpdateOne( ctx, bson.M{"chat_id": chatID}, - bson.M{"addToSet": bson.M{"users": username}}, + bson.M{"$addToSet": bson.M{"users": username}}, ) return err }