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 +2 -3
- package/package.json +1 -1
- package/plugin.json +1 -1
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
package/plugin.json
CHANGED