Files
skyview.astronomiemuseum.de/config/telegram_message_footer.php
T
2026-04-06 09:24:31 +02:00

24 lines
504 B
PHP

<?php
declare(strict_types=1);
function telegramServiceFooter(): string
{
return 'Ein Service des Astronomiemuseums der Sternwarte Sonneberg: https://astronomiemuseum.de';
}
function appendTelegramServiceFooter(string $text): string
{
$footer = telegramServiceFooter();
$trimmedText = trim($text);
if ($trimmedText === '') {
return $footer;
}
if (str_contains($trimmedText, $footer)) {
return $trimmedText;
}
return $trimmedText . "\n\n" . $footer;
}