This commit is contained in:
Andrey Kondratev
2025-08-29 18:26:00 +05:00
parent 9bdf522f59
commit 82d2713d15
6 changed files with 36 additions and 8 deletions

View File

@@ -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' });