From 4b24b29c03a7060ad88c79913392a1f2adbd2f5c Mon Sep 17 00:00:00 2001 From: rambros Date: Wed, 25 Mar 2026 12:35:22 +0530 Subject: [PATCH] categorize forum channel messages are thread starter --- src/core/exporter.py | 6 ++++++ src/ui/shuttle_ops.py | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/core/exporter.py b/src/core/exporter.py index bce8bf6..f04541a 100644 --- a/src/core/exporter.py +++ b/src/core/exporter.py @@ -543,7 +543,13 @@ class DiscordExporter: content = msg.content or "" msg_type = int(msg.type.value) if hasattr(msg.type, "value") else 0 + # Force MessageType.thread_starter_message (21) for forum post starter messages + if isinstance(msg.channel, discord.Thread) and isinstance(msg.channel.parent, discord.ForumChannel): + if msg.id == msg.channel.id: + msg_type = 21 + is_forwarded = getattr(msg.flags, 'forwarded', False) + if is_forwarded and hasattr(msg, 'message_snapshots') and msg.message_snapshots: msg_type = 100 # Custom Forward type snapshot = msg.message_snapshots[0] diff --git a/src/ui/shuttle_ops.py b/src/ui/shuttle_ops.py index 137ca87..c8ada51 100644 --- a/src/ui/shuttle_ops.py +++ b/src/ui/shuttle_ops.py @@ -184,6 +184,9 @@ class OperationPane(Container): self.run_validate() def _base_dir(self) -> str: + # If the config file is in the root, our base directory is current (.) + if str(self.config_path) == "reaper_config.yaml": + return "." return f"ReaperFiles-{self.cfg_name}" def _rebuild_engine(self):