diff options
author | 2024-08-11 01:23:10 +0200 | |
---|---|---|
committer | 2024-08-11 01:23:10 +0200 | |
commit | 133dbf87c50c70f8644cfd7916aff3daa8fac520 (patch) | |
tree | f94c259842d199b62a087dcc6a0c507275a605a8 | |
parent | 2e6e2467598c8400cf476cb5914b3a8bd1a3601d (diff) | |
download | rss-bridge-133dbf87c50c70f8644cfd7916aff3daa8fac520.tar.gz rss-bridge-133dbf87c50c70f8644cfd7916aff3daa8fac520.tar.zst rss-bridge-133dbf87c50c70f8644cfd7916aff3daa8fac520.zip |
fix(telegram): add note if content is omitted from preview page (#4210)
* fix(telegram): add note if content is omitted from preview page
* lint
-rw-r--r-- | bridges/TelegramBridge.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bridges/TelegramBridge.php b/bridges/TelegramBridge.php index a3c910e8..81c5aeb9 100644 --- a/bridges/TelegramBridge.php +++ b/bridges/TelegramBridge.php @@ -70,8 +70,14 @@ class TelegramBridge extends BridgeAbstract { $message = ''; + $notSupported = $messageDiv->find('div.message_media_not_supported_wrap', 0); + if ($notSupported) { + // For unknown reasons, the telegram preview page omits the content of this post + $message = 'RSS-Bridge was unable to find the content of this post.<br><br>' . $notSupported->innertext; + } + if ($messageDiv->find('div.tgme_widget_message_forwarded_from', 0)) { - $message = $messageDiv->find('div.tgme_widget_message_forwarded_from', 0)->innertext . '<br><br>'; + $message .= $messageDiv->find('div.tgme_widget_message_forwarded_from', 0)->innertext . '<br><br>'; } if ($messageDiv->find('a.tgme_widget_message_reply', 0)) { |