From bde00447f1b3c3e54090f21fa5079499c728f4d5 Mon Sep 17 00:00:00 2001 From: Dag Date: Wed, 22 Jun 2022 18:33:21 +0200 Subject: [PATCH] [Telegram] fix: remove all enclosures except for videos (#2850) --- bridges/TelegramBridge.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bridges/TelegramBridge.php b/bridges/TelegramBridge.php index 65eab557..415bc636 100644 --- a/bridges/TelegramBridge.php +++ b/bridges/TelegramBridge.php @@ -189,7 +189,6 @@ EOD; return $stickerDiv; } elseif (preg_match($this->backgroundImageRegex, $stickerDiv->find('i', 0)->style, $sticker)) { - $this->enclosures[] = $sticker[1]; return << @@ -237,7 +236,6 @@ EOD; preg_match($this->backgroundImageRegex, $preview->find('i', 0)->style, $photo)) { $image = ''; - $this->enclosures[] = $photo[1]; } if ($preview->find('div.link_preview_title', 0)) { @@ -288,8 +286,6 @@ EOD; foreach ($messageDiv->find('a.tgme_widget_message_photo_wrap') as $photoWrap) { preg_match($this->backgroundImageRegex, $photoWrap->style, $photo); - $this->enclosures[] = $photo[1]; - $photos .= <<
EOD; @@ -308,8 +304,6 @@ EOD; preg_match($this->backgroundImageRegex, $messageDiv->find('i.link_preview_video_thumb', 0)->style, $photo); } - $this->enclosures[] = $photo[1]; - return << {$messageDiv->find('div.message_media_not_supported_label', 0)->innertext}

@@ -344,8 +338,6 @@ EOD; $link = $messageDiv->find('a.tgme_widget_message_location_wrap', 0)->href; - $this->enclosures[] = $image[1]; - return << EOD;