mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-05 13:16:40 +02:00
fix: check if unread_tids are followed
This commit is contained in:
@@ -318,6 +318,9 @@ module.exports = function (module) {
|
||||
if (!key) {
|
||||
return;
|
||||
}
|
||||
if (!values.length) {
|
||||
return [];
|
||||
}
|
||||
values = values.map(helpers.valueToString);
|
||||
const results = await module.client.collection('objects').find({
|
||||
_key: key, value: { $in: values },
|
||||
|
||||
@@ -410,6 +410,9 @@ SELECT 1
|
||||
return;
|
||||
}
|
||||
|
||||
if (!values.length) {
|
||||
return [];
|
||||
}
|
||||
values = values.map(helpers.valueToString);
|
||||
|
||||
const res = await module.pool.query({
|
||||
|
||||
@@ -203,6 +203,9 @@ module.exports = function (module) {
|
||||
};
|
||||
|
||||
module.isSortedSetMembers = async function (key, values) {
|
||||
if (!values.length) {
|
||||
return [];
|
||||
}
|
||||
const batch = module.client.batch();
|
||||
values.forEach(v => batch.zscore(key, String(v)));
|
||||
const results = await helpers.execBatch(batch);
|
||||
|
||||
Reference in New Issue
Block a user