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.
@@ -0,0 +1,3 @@
1
+ {
2
+ "user-mentioned-you-in": "<strong>%1</strong> הזכיר אותך ב <strong>%2</strong>"
3
+ }
@@ -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
- "notificationType_mention": "כאשר מישהו מזכיר אותך"
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 !== 'on') {
597
- return users;
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
- if (data.composerObj) {
601
- const cid = Topics.getTopicField(data.composerObj.tid, 'cid');
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
- users = users.filter(userObj => filteredUids.includes(userObj.uid));
604
+ return users;
605
605
  }
606
606
 
607
- return users;
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