nodebb-plugin-mentions 4.6.10 → 4.7.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.
Files changed (2) hide show
  1. package/library.js +7 -2
  2. package/package.json +3 -3
package/library.js CHANGED
@@ -480,7 +480,7 @@ Mentions.parseRaw = async (content, type = 'default') => {
480
480
  if (user && user.uid) {
481
481
  switch (Mentions._settings.display) {
482
482
  case 'fullname':
483
- match = user.fullname || match;
483
+ match = user.displayname || match;
484
484
  break;
485
485
  case 'username':
486
486
  match = user.username;
@@ -488,7 +488,12 @@ Mentions.parseRaw = async (content, type = 'default') => {
488
488
  }
489
489
  }
490
490
 
491
- const str = `<a class="plugin-mentions-${mentionType} plugin-mentions-a" href="${url}">${match}</a>`;
491
+ let str;
492
+ if (type === 'markdown') {
493
+ str = `[${match}](${nconf.get('url')}${url})`;
494
+ } else {
495
+ str = `<a class="plugin-mentions-${mentionType} plugin-mentions-a" href="${url}">${match}</a>`;
496
+ }
492
497
 
493
498
  return plain + str;
494
499
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-mentions",
3
- "version": "4.6.10",
3
+ "version": "4.7.0",
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": {
@@ -19,7 +19,7 @@
19
19
  "url": "https://github.com/julianlam/nodebb-plugin-mentions/issues"
20
20
  },
21
21
  "nbbpm": {
22
- "compatibility": "^4.0.0"
22
+ "compatibility": "^4.1.0"
23
23
  },
24
24
  "dependencies": {
25
25
  "html-entities": "^2.3.2",
@@ -30,6 +30,6 @@
30
30
  "eslint": "^9.0.0",
31
31
  "eslint-config-nodebb": "0.2.1",
32
32
  "eslint-plugin-import": "2.31.0",
33
- "mocha": "10.8.2"
33
+ "mocha": "11.1.0"
34
34
  }
35
35
  }