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