nodebb-plugin-mentions 3.0.7 → 3.0.10

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.
@@ -1,3 +1,6 @@
1
- {
2
- "user_mentioned_you_in": "<strong>%1</strong> nevnte deg i <strong>%2</strong>"
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.actionPostPurge = async (hookData) => {
173
- if (hookData && hookData.post) {
172
+ Mentions.actionPostsPurge = async (hookData) => {
173
+ if (hookData && Array.isArray(hookData.pids)) {
174
174
  await db.deleteAll([
175
- `mentions:pid:${hookData.post.pid}:uids`,
176
- `mentions:pid:${hookData.post.pid}:groups`,
175
+ ...hookData.posts.map(p => `mentions:pid:${p.pid}:uids`),
176
+ ...hookData.posts.map(p => `mentions:pid:${p.pid}:groups`),
177
177
  ]);
178
178
  }
179
179
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-mentions",
3
- "version": "3.0.7",
3
+ "version": "3.0.10",
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.15.0"
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.1",
35
- "eslint": "8.10.0",
34
+ "mocha": "9.2.2",
35
+ "eslint": "8.14.0",
36
36
  "eslint-config-nodebb": "0.1.1",
37
- "eslint-plugin-import": "2.25.4"
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:post.purge", "method": "actionPostPurge" },
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" }