Bugfixes Telegram

This commit is contained in:
Eskimue
2026-04-08 13:22:12 +02:00
parent 19c19f0444
commit b203078113
6 changed files with 6 additions and 6 deletions
+23
View File
@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
function telegramServiceFooter(): string
{
return 'Ein Service des Astronomiemuseums der Sternwarte Sonneberg';
}
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;
}