Skip to content

Commit

Permalink
fix(route/telegram): null username from telegram api
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudoyu committed Oct 28, 2024
1 parent abed9a0 commit 24e8c1e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/routes/telegram/tglib/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,19 +144,19 @@ export default async function handler(ctx) {
title,
description,
pubDate: new Date(message.date * 1000).toUTCString(),
link: `https://t.me/s/${channelInfo.username}/${message.id}`,
author: `${channelInfo.title} (@${channelInfo.username})`,
link: `https://t.me/s/${ctx.req.param('username')}/${message.id}`,
author: `${channelInfo.title} (@${ctx.req.param('username')})`,
});
}
}

return {
title: channelInfo.title,
language: null,
link: `https://t.me/${channelInfo.username}`,
link: `https://t.me/${ctx.req.param('username')}`,
item,
allowEmpty: ctx.req.param('id') === 'allow_empty',
description: `@${channelInfo.username} on Telegram`,
description: `@${ctx.req.param('username')} on Telegram`,
};
}

Expand Down

0 comments on commit 24e8c1e

Please sign in to comment.