diff --git a/app/bot.py b/app/bot.py index 55c1cbc..0a5dfc0 100644 --- a/app/bot.py +++ b/app/bot.py @@ -66,11 +66,12 @@ def get_ogg_duration(path: str) -> int: def clean_text(text: str) -> str: text = emoji.replace_emoji(text, '') + text = re.sub(r'@\S+\s*', '', text) text = re.sub(r'[ \t]+', ' ', text) text = re.sub(r'\n{2,}', '\n', text) text = text.strip() if text: - text += '\nКонец сообщения.' + text += '\nПип.' return text