diff --git a/rss_generator.py b/rss_generator.py
index 99d2866..25660d0 100644
--- a/rss_generator.py
+++ b/rss_generator.py
@@ -179,6 +179,13 @@ async def _render_messages_groups(messages_groups, post_parser, exclude_flags: s
all_html_bodies = [msg['html']['body'] for msg in processed_messages if msg['html']['body']]
combined_html_body = '\n
\n'.join(all_html_bodies)
+ # Collect all unique flags from all messages in the group
+ all_flags = set()
+ for msg in processed_messages:
+ if msg.get('flags'): # Check if flags exist and are not empty
+ all_flags.update(msg['flags'])
+ combined_flags = list(all_flags) # Convert back to list if needed, or keep as set
+
html_parts = [
f'