name fix
This commit is contained in:
@@ -219,7 +219,7 @@ app.post('/api/telegram-send', async (req: Request, res: Response) => {
|
||||
console.log('🚀 Telegram send request received');
|
||||
|
||||
try {
|
||||
const { userId, audioUrl, title }: { userId?: string; audioUrl?: string; title?: string } = req.body;
|
||||
const { userId, audioUrl, title, performer, thumbnail }: { userId?: string; audioUrl?: string; title?: string; performer?: string; thumbnail?: string } = req.body;
|
||||
console.log(`📤 Sending to user ${userId}: ${title}`);
|
||||
|
||||
if (!userId || !audioUrl || !title) {
|
||||
@@ -233,7 +233,7 @@ app.post('/api/telegram-send', async (req: Request, res: Response) => {
|
||||
}
|
||||
|
||||
const chatId = parseInt(userId);
|
||||
await botInstance.sendAudioFile(chatId, audioUrl, title);
|
||||
await botInstance.sendAudioFile(chatId, audioUrl, title, performer, thumbnail);
|
||||
console.log('✅ Audio sent successfully');
|
||||
|
||||
res.json({ success: true, message: 'Audio sent successfully' });
|
||||
|
||||
Reference in New Issue
Block a user