fix entry loss issue

This commit is contained in:
Tiger Ren 2025-01-01 23:28:48 +08:00
parent 05e0304901
commit b93ea90af5
1 changed files with 3 additions and 2 deletions

View File

@ -30,14 +30,14 @@ class TelegramLinkFixerExtension extends Minz_Extension
if (strpos($link, 't.me') === false) {
error_log('TelegramLinkFixer: Skipping - not a telegram link');
return; // skip if not a telegram link
return $entry; // skip if not a telegram link
}
// The correct method is content() not description()
$description = $entry->content();
if (empty($description)) {
error_log('TelegramLinkFixer: Skipping - empty content');
return;
return $entry;
}
// First try: Look for Telegraph link with "Telegraph" text
@ -59,6 +59,7 @@ class TelegramLinkFixerExtension extends Minz_Extension
return $entry;
} catch (Exception $e) {
Minz_Log::error('TelegramLinkFixer: Error processing entry: ' . $e->getMessage());
return $entry;
}
}
}