Skip to content

Commit

Permalink
fix(telegram): add note if content is omitted from preview page
Browse files Browse the repository at this point in the history
  • Loading branch information
dvikan committed Aug 10, 2024
1 parent 2e6e246 commit a9b2a0c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bridges/TelegramBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,14 @@ private function processContent($messageDiv)
{
$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)) {
Expand Down

0 comments on commit a9b2a0c

Please sign in to comment.