fix AddUserInChat
This commit is contained in:
parent
9d5b5c2a2f
commit
42f73f84fd
2
db/db.go
2
db/db.go
|
@ -57,7 +57,7 @@ func AddUserInChat(chatID int64, username string) error {
|
||||||
_, err = collection.UpdateOne(
|
_, err = collection.UpdateOne(
|
||||||
ctx,
|
ctx,
|
||||||
bson.M{"chat_id": chatID},
|
bson.M{"chat_id": chatID},
|
||||||
bson.M{"addToSet": bson.M{"users": username}},
|
bson.M{"$addToSet": bson.M{"users": username}},
|
||||||
)
|
)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue