fix entry loss issue
This commit is contained in:
parent
05e0304901
commit
b93ea90af5
|
|
@ -30,14 +30,14 @@ class TelegramLinkFixerExtension extends Minz_Extension
|
||||||
|
|
||||||
if (strpos($link, 't.me') === false) {
|
if (strpos($link, 't.me') === false) {
|
||||||
error_log('TelegramLinkFixer: Skipping - not a telegram link');
|
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()
|
// The correct method is content() not description()
|
||||||
$description = $entry->content();
|
$description = $entry->content();
|
||||||
if (empty($description)) {
|
if (empty($description)) {
|
||||||
error_log('TelegramLinkFixer: Skipping - empty content');
|
error_log('TelegramLinkFixer: Skipping - empty content');
|
||||||
return;
|
return $entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
// First try: Look for Telegraph link with "Telegraph" text
|
// First try: Look for Telegraph link with "Telegraph" text
|
||||||
|
|
@ -59,6 +59,7 @@ class TelegramLinkFixerExtension extends Minz_Extension
|
||||||
return $entry;
|
return $entry;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
Minz_Log::error('TelegramLinkFixer: Error processing entry: ' . $e->getMessage());
|
Minz_Log::error('TelegramLinkFixer: Error processing entry: ' . $e->getMessage());
|
||||||
|
return $entry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue