[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
1 changed files with 10 additions and 2 deletions
|
@ -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 a new issue