nodebb-plugin-onekite-discord 1.0.2 → 1.0.3

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
@@ -174,10 +174,11 @@ async function buildEmbed({ tid, pid, isReply }) {
174
174
  const postForUser = await posts.getPostFields(isReply ? pid : topicData.mainPid, ['uid']);
175
175
  const username = await user.getUserField(postForUser.uid, 'username');
176
176
 
177
- // "Titre actuel avec lien" - Pseudo (pseudo sans lien)
178
- const content = `[${safeTitle}](${targetUrl}) - ${username}`;
177
+ // Tout le titre dans l'embed : "[Catégorie] Titre - Pseudo" (pseudo sans lien)
178
+ const embedTitle = `${safeTitle} - ${username}`.slice(0, 256);
179
179
 
180
- return { topicData, content, embed: { description: excerpt || '' } };
180
+ // Embed title becomes clickable via embed.url
181
+ return { topicData, content: '', embed: { title: embedTitle, url: targetUrl, description: excerpt || '' } };
181
182
  }
182
183
 
183
184
  function extractTidPid(data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-onekite-discord",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
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
@@ -32,5 +32,5 @@
32
32
  "acpScripts": [
33
33
  "public/admin.js"
34
34
  ],
35
- "version": "1.0.2"
35
+ "version": "1.0.3"
36
36
  }