Deploy on 2026-06-05 17:24:21
This commit is contained in:
@@ -162,14 +162,34 @@ class TelegramNotifier
|
||||
$type = $opportunity['type'] ?? 'other';
|
||||
$score = $opportunity['score'] ?? 0;
|
||||
$url = $opportunity['url'] ?? '';
|
||||
$desc = mb_substr($opportunity['description'] ?? '', 0, 200);
|
||||
$desc = $opportunity['description'] ?? '';
|
||||
$orgName = $opportunity['org_name'] ?? '';
|
||||
|
||||
$message = "*New Opportunity:* {$title}\n";
|
||||
$message .= "*Type:* {$type} | *Score:* {$score}/100\n";
|
||||
if ($orgName) $message .= "*Organization:* {$orgName}\n";
|
||||
if ($desc) $message .= "_{$desc}_\n";
|
||||
if ($url) $message .= "\n[Open Link]({$url})";
|
||||
$typeTranslations = [
|
||||
'vc_funding' => 'تمويل رأس مال جريء (VC)',
|
||||
'accelerator' => 'مسرعة أعمال (Accelerator)',
|
||||
'incubator' => 'حاضنة أعمال (Incubator)',
|
||||
'grant' => 'منحة (Grant)',
|
||||
'competition' => 'مسابقة (Competition)',
|
||||
'demo_day' => 'يوم عرض المشاريع (Demo Day)',
|
||||
'event' => 'فعالية (Event)',
|
||||
'partnership' => 'شراكة (Partnership)',
|
||||
'other' => 'أخرى',
|
||||
];
|
||||
$translatedType = $typeTranslations[$type] ?? $type;
|
||||
|
||||
$message = "💡 *فرصة استثمارية جديدة:* {$title}\n\n";
|
||||
$message .= "▪️ *النوع:* {$translatedType}\n";
|
||||
$message .= "▪️ *درجة الأهمية:* {$score}/100\n";
|
||||
if ($orgName) {
|
||||
$message .= "▪️ *الجهة:* {$orgName}\n";
|
||||
}
|
||||
if ($desc) {
|
||||
$message .= "\n*الملخص ونقاط القوة:*\n_{$desc}_\n";
|
||||
}
|
||||
if ($url) {
|
||||
$message .= "\n🔗 [رابط التقديم والتواصل]({$url})";
|
||||
}
|
||||
|
||||
$this->send($message, 'opportunity');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user