diff --git a/config.py b/config.py index 81fb28f..3315171 100644 --- a/config.py +++ b/config.py @@ -19,4 +19,5 @@ def get_settings(): "token": os.getenv("TOKEN", ""), "time_based_merge": os.getenv("TIME_BASED_MERGE", "False").strip() in ["True", "true"], "show_bridge_link": os.getenv("SHOW_BRIDGE_LINK", "False").strip() in ["True", "true"], + "show_post_flags": os.getenv("SHOW_POST_FLAGS", "False").strip() in ["True", "true"], } diff --git a/post_parser.py b/post_parser.py index 116aff5..c4ea10c 100644 --- a/post_parser.py +++ b/post_parser.py @@ -285,6 +285,9 @@ class PostParser: return html_content def _format_flags(self, message: Message) -> str: + if not Config['show_post_flags']: + return '' + flags = self._extract_flags(message) if flags: return f'
'