nodebb-plugin-mentions 4.6.7 → 4.6.8

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/library.js CHANGED
@@ -127,7 +127,7 @@ Mentions.notify = async function ({ post }) {
127
127
  }
128
128
  }
129
129
 
130
- if (!uidsToNotify.length && !groupsToNotify.length) {
130
+ if ((!uidsToNotify && !groupsToNotify) || (!uidsToNotify.length && !groupsToNotify.length)) {
131
131
  return;
132
132
  }
133
133
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-mentions",
3
- "version": "4.6.7",
3
+ "version": "4.6.8",
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
  "repository": {
@@ -30,6 +30,6 @@
30
30
  "eslint": "^9.0.0",
31
31
  "eslint-config-nodebb": "0.2.1",
32
32
  "eslint-plugin-import": "2.29.1",
33
- "mocha": "10.6.0"
33
+ "mocha": "10.7.3"
34
34
  }
35
35
  }
@@ -37,6 +37,14 @@ $(document).ready(function () {
37
37
  composerObj: composer.posts[uuid],
38
38
  }, function (err, users) {
39
39
  if (err) {
40
+ require(['alerts'], function (alerts) {
41
+ alerts.alert({
42
+ id: 'mention-error',
43
+ type: 'danger',
44
+ message: err.message,
45
+ timeout: 5000,
46
+ });
47
+ });
40
48
  return callback([]);
41
49
  }
42
50
  const termLowerCase = term.toLocaleLowerCase();