nodebb-plugin-mentions 3.0.6 → 3.0.9
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/nb/notifications.json +5 -2
- package/library.js +6 -5
- package/package.json +5 -5
- package/plugin.json +1 -1
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"
|
|
1
|
+
{
|
|
2
|
+
"mentions": "Omtaler",
|
|
3
|
+
"user_mentioned_you_in": "<strong>%1</strong> nevnte deg i <strong>%2</strong>",
|
|
4
|
+
"user_mentioned_group_in": "<strong>%1</strong> nevnte <strong>%2</strong> i <strong>%3</strong>",
|
|
5
|
+
"notificationType_mention": "Når noen nevner deg"
|
|
3
6
|
}
|
package/library.js
CHANGED
|
@@ -169,11 +169,11 @@ async function getGroupsToNotify(matches) {
|
|
|
169
169
|
}));
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
Mentions.
|
|
173
|
-
if (hookData && hookData.
|
|
172
|
+
Mentions.actionPostsPurge = async (hookData) => {
|
|
173
|
+
if (hookData && Array.isArray(hookData.pids)) {
|
|
174
174
|
await db.deleteAll([
|
|
175
|
-
`mentions:pid:${
|
|
176
|
-
`mentions:pid:${
|
|
175
|
+
...hookData.pids.map(pid => `mentions:pid:${pid}:uids`),
|
|
176
|
+
...hookData.pids.map(pid => `mentions:pid:${pid}:groups`),
|
|
177
177
|
]);
|
|
178
178
|
}
|
|
179
179
|
};
|
|
@@ -388,7 +388,8 @@ async function stripDisallowedFullnames(users) {
|
|
|
388
388
|
|
|
389
389
|
SocketPlugins.mentions.getTopicUsers = async (socket, data) => {
|
|
390
390
|
const uids = await Topics.getUids(data.tid);
|
|
391
|
-
|
|
391
|
+
let users = await User.getUsers(uids);
|
|
392
|
+
users = users.filter(u => u && u.userslug);
|
|
392
393
|
if (Meta.config.hideFullname) {
|
|
393
394
|
return users;
|
|
394
395
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodebb-plugin-mentions",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.9",
|
|
4
4
|
"description": "NodeBB Plugin that allows users to mention other users by prepending an '@' sign to their username",
|
|
5
5
|
"main": "library.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"url": "https://github.com/julianlam/nodebb-plugin-mentions/issues"
|
|
23
23
|
},
|
|
24
24
|
"nbbpm": {
|
|
25
|
-
"compatibility": "^1.
|
|
25
|
+
"compatibility": "^1.19.6"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"html-entities": "^2.3.2",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"xregexp": "^5.1.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"mocha": "9.2.
|
|
35
|
-
"eslint": "8.
|
|
34
|
+
"mocha": "9.2.2",
|
|
35
|
+
"eslint": "8.14.0",
|
|
36
36
|
"eslint-config-nodebb": "0.1.1",
|
|
37
|
-
"eslint-plugin-import": "2.
|
|
37
|
+
"eslint-plugin-import": "2.26.0"
|
|
38
38
|
}
|
|
39
39
|
}
|
package/plugin.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
{ "hook": "filter:parse.raw", "method": "parseRaw" },
|
|
15
15
|
{ "hook": "action:post.save", "method": "notify" },
|
|
16
16
|
{ "hook": "action:post.edit", "method": "notify" },
|
|
17
|
-
{ "hook": "action:
|
|
17
|
+
{ "hook": "action:posts.purge", "method": "actionPostsPurge" },
|
|
18
18
|
{ "hook": "filter:notifications.addFilters", "method": "addFilters" },
|
|
19
19
|
{ "hook": "filter:user.notificationTypes", "method": "notificationTypes" },
|
|
20
20
|
{ "hook": "filter:users.addFields", "method": "addFields" }
|