File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -30,14 +30,6 @@ const LABELS: Record<string, string> = {
3030 "ai-monthly-vi" : "AI Tools Monthly" ,
3131} ;
3232
33- const HIGHLIGHT_KEY : Record < string , string > = {
34- "ai-cli-vi" : "ai-cli" ,
35- "ai-agents-vi" : "ai-agents" ,
36- "ai-web-vi" : "ai-web" ,
37- "ai-trending-vi" : "ai-trending" ,
38- "ai-hn-vi" : "ai-hn" ,
39- } ;
40-
4133async function sendTelegram ( text : string ) : Promise < void > {
4234 const BOT_TOKEN = process . env [ "TELEGRAM_BOT_TOKEN" ] ?? "" ;
4335 const CHAT_ID = process . env [ "TELEGRAM_CHAT_ID" ] ?? "" ;
@@ -103,8 +95,8 @@ function buildMessage(date: string, reports: string[]): string {
10395 lines . push ( "" ) ;
10496 lines . push ( `• <a href="${ url } ">${ label } </a>` ) ;
10597
106- const hKey = HIGHLIGHT_KEY [ r ] ;
107- const items = hKey ? highlights [ hKey ] : undefined ;
98+ const hKey = r . replace ( / - v i $ / , "" ) ;
99+ const items = highlights [ hKey ] ;
108100 if ( items ?. length ) {
109101 for ( const h of items ) {
110102 lines . push ( ` ◦ ${ h } ` ) ;
You can’t perform that action at this time.
0 commit comments