mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-05 00:59:35 +00:00
[TelegramBridge] Fix forwarded videos (#1202)
Videos forwarded from other channels use a slightly different format, This fixes it.
This commit is contained in:
parent
50162f52b6
commit
a31e518a07
@ -224,7 +224,11 @@ EOD;
|
||||
$this->itemTitle = '@' . $this->processUsername() . ' posted a video';
|
||||
}
|
||||
|
||||
preg_match($this->backgroundImageRegex, $messageDiv->find('i.tgme_widget_message_video_thumb', 0)->style, $photo);
|
||||
if ($messageDiv->find('i.tgme_widget_message_video_thumb')) {
|
||||
preg_match($this->backgroundImageRegex, $messageDiv->find('i.tgme_widget_message_video_thumb', 0)->style, $photo);
|
||||
} elseif ($messageDiv->find('i.link_preview_video_thumb')) {
|
||||
preg_match($this->backgroundImageRegex, $messageDiv->find('i.link_preview_video_thumb', 0)->style, $photo);
|
||||
}
|
||||
|
||||
$this->enclosures[] = $photo[1];
|
||||
|
||||
@ -261,7 +265,11 @@ EOD;
|
||||
$this->itemTitle = '@' . $this->processUsername() . ' posted a video';
|
||||
}
|
||||
|
||||
preg_match($this->backgroundImageRegex, $messageDiv->find('i.tgme_widget_message_video_thumb', 0)->style, $photo);
|
||||
if ($messageDiv->find('i.tgme_widget_message_video_thumb')) {
|
||||
preg_match($this->backgroundImageRegex, $messageDiv->find('i.tgme_widget_message_video_thumb', 0)->style, $photo);
|
||||
} elseif ($messageDiv->find('i.link_preview_video_thumb')) {
|
||||
preg_match($this->backgroundImageRegex, $messageDiv->find('i.link_preview_video_thumb', 0)->style, $photo);
|
||||
}
|
||||
|
||||
$this->enclosures[] = $photo[1];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user