fixed again

This commit is contained in:
Tomoya Matsuura(MacBookPro) 2024-03-11 23:22:46 +09:00
parent e6ff6aeee5
commit f3c7a5dba1

View File

@ -102,13 +102,13 @@ async function postToBluesky(text, images) {
} }
const richText = new RichText({ text: completetext }); const richText = new RichText({ text: completetext });
await richText.detectFacets(agent); await richText.detectFacets(agent);
let text = richText.text; let t = richText.text;
if (richText.graphemeLength > 300) { if (richText.graphemeLength > 300) {
text = text.substr(0,299) + '…'; t = t.substring(0,299) + '…';
} }
return agent.post({ return agent.post({
text: text, text: t,
facets: richText.facets, facets: richText.facets,
}); });
} }