mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 08:55:47 +01:00
fix: #7842, groups.invite works with an array of uids
This commit is contained in:
@@ -7,7 +7,9 @@ module.exports = function (module) {
|
||||
if (!Array.isArray(value)) {
|
||||
value = [value];
|
||||
}
|
||||
|
||||
if (!value.length) {
|
||||
return;
|
||||
}
|
||||
value = value.map(v => helpers.valueToString(v));
|
||||
|
||||
await module.client.collection('objects').updateOne({
|
||||
|
||||
@@ -9,7 +9,9 @@ module.exports = function (module) {
|
||||
if (!Array.isArray(value)) {
|
||||
value = [value];
|
||||
}
|
||||
|
||||
if (!value.length) {
|
||||
return;
|
||||
}
|
||||
await module.transaction(async function (client) {
|
||||
await helpers.ensureLegacyObjectType(client, key, 'set');
|
||||
await client.query({
|
||||
|
||||
Reference in New Issue
Block a user