mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-26 03:16:33 +03:00
[TelegramBridge] Display the name of the attachments (#2003)
Sometimes attachments are posted in Telegram channels without any text. The script recognizes a new message but does not report any text, with this commit the file names will also be included in the RSS Feed.
This commit is contained in:
parent
75b85f61e7
commit
3aafd44079
1 changed files with 6 additions and 0 deletions
|
@ -132,6 +132,12 @@ class TelegramBridge extends BridgeAbstract {
|
|||
$messageDiv->find('div.tgme_widget_message_text.js-message_text', 0)->plaintext
|
||||
);
|
||||
}
|
||||
if ($messageDiv->find('div.tgme_widget_message_document', 0)) {
|
||||
$message .= 'Attachments:';
|
||||
foreach ($messageDiv->find('div.tgme_widget_message_document') as $attachments) {
|
||||
$message .= $attachments->find('div.tgme_widget_message_document_title.accent_color', 0);
|
||||
}
|
||||
}
|
||||
|
||||
if ($messageDiv->find('a.tgme_widget_message_link_preview', 0)) {
|
||||
$message .= $this->processLinkPreview($messageDiv);
|
||||
|
|
Loading…
Reference in a new issue