nodebb-plugin-onekite-discord 1.0.12 → 1.0.13

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
@@ -30,7 +30,6 @@ function extractDiscordLinks(str) {
30
30
  // Very small sanity check
31
31
  if (!/^https?:\/\//i.test(url)) return null;
32
32
  return url;
33
- fields: linkFields,
34
33
  };
35
34
 
36
35
  const push = (text, url) => {
@@ -353,7 +352,7 @@ for (let i = 0; i < extractedLinks.length && linkFields.length < maxFields; i +=
353
352
  const embedTitle = `${replyIcon}${safeTitle} – ${username}`.slice(0, 256);
354
353
 
355
354
  // Embed title becomes clickable via embed.url
356
- return { topicData, content: '', embed: { title: embedTitle, url: targetUrl, description: stripLinkMarkup(excerpt || '') } };
355
+ return { topicData, content: '', embed: { title: embedTitle, url: targetUrl, description: stripLinkMarkup(excerpt || ''), fields: linkFields } };
357
356
  }
358
357
 
359
358
  function extractTidPid(data) {
@@ -416,4 +415,4 @@ Plugin.onTopicReply = async (data) => {
416
415
  await sendDiscord(settings.webhookUrl, { content: built.content, embeds: [built.embed] });
417
416
  };
418
417
 
419
- module.exports = Plugin;
418
+ module.exports = Plugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-onekite-discord",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "Discord webhook notifier for Onekite (NodeBB v4.x only)",
5
5
  "main": "library.js",
6
6
  "license": "MIT",
package/plugin.json CHANGED
@@ -31,5 +31,5 @@
31
31
  "acpScripts": [
32
32
  "public/admin.js"
33
33
  ],
34
- "version": "1.0.12"
34
+ "version": "1.0.13"
35
35
  }