nodebb-plugin-mentions 4.7.5 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/languages/he/mentions.json +3 -0
- package/languages/he/notifications.json +2 -1
- package/library.js +12 -8
- package/package-lock.json +206 -767
- package/package.json +2 -2
- package/static/autofill.js +19 -4
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mentions": "אזכורים",
|
|
3
3
|
"user-mentioned-you-in": "<strong>%1</strong> הזכיר אותך ב <strong>%2</strong>",
|
|
4
|
+
"user-mentioned-you-in-room": "<strong>%1</strong> הזכיר אותך ב <strong class=\"text-nowrap\"><i class=\"fa %2\"></i>%3</strong>",
|
|
4
5
|
"user-mentioned-group-in": "<strong>%1</strong> הזכיר את <strong>%2</strong> ב <strong>%3</strong>",
|
|
5
|
-
"
|
|
6
|
+
"notificationType-mention": "כאשר מישהו מזכיר אותך"
|
|
6
7
|
}
|
package/library.js
CHANGED
|
@@ -593,17 +593,21 @@ SocketPlugins.mentions.userSearch = async (socket, data) => {
|
|
|
593
593
|
).concat(fullnameUsers);
|
|
594
594
|
}
|
|
595
595
|
|
|
596
|
-
if (Mentions._settings.privilegedDirectReplies
|
|
597
|
-
|
|
598
|
-
|
|
596
|
+
if (Mentions._settings.privilegedDirectReplies === 'on') {
|
|
597
|
+
if (data.composerObj) {
|
|
598
|
+
const cid = Topics.getTopicField(data.composerObj.tid, 'cid');
|
|
599
|
+
const filteredUids = await filterPrivilegedUids(users.map(userObj => userObj.uid), cid, data.composerObj.toPid);
|
|
599
600
|
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
const filteredUids = await filterPrivilegedUids(users.map(userObj => userObj.uid), cid, data.composerObj.toPid);
|
|
601
|
+
users = users.filter(userObj => filteredUids.includes(userObj.uid));
|
|
602
|
+
}
|
|
603
603
|
|
|
604
|
-
|
|
604
|
+
return users;
|
|
605
605
|
}
|
|
606
606
|
|
|
607
|
-
|
|
607
|
+
// Remote categories
|
|
608
|
+
let { categories: categoriesObj } = await categories.search(data);
|
|
609
|
+
categoriesObj = categoriesObj.filter(category => !utils.isNumber(category.cid));
|
|
610
|
+
|
|
611
|
+
return [...users, ...categoriesObj];
|
|
608
612
|
};
|
|
609
613
|
|