diff --git a/lib/v2/twitter/utils.js b/lib/v2/twitter/utils.js
index 15a3924e2..36fb991df 100644
--- a/lib/v2/twitter/utils.js
+++ b/lib/v2/twitter/utils.js
@@ -31,9 +31,11 @@ const replaceBreak = (text) => text.replaceAll(/
|
/g, ' ');
const formatText = (item) => {
let text = item.full_text;
+ const id_str = item.id_str || item.conversation_id_str;
const urls = item.entities.urls || [];
for (const url of urls) {
- text = text.replaceAll(url.url, url.expanded_url);
+ // trim link pointing to the tweet itself (usually appears when the tweet is truncated)
+ text = text.replaceAll(url.url, url.expanded_url.endsWith(id_str) ? '' : url.expanded_url);
}
const media = item.extended_entities?.media || [];
for (const m of media) {
@@ -361,20 +363,27 @@ const ProcessFeed = (ctx, { data = [] }, params = {}) => {
description += quote;
if (readable) {
- description += `