fix thread starter file path

This commit is contained in:
rambros 2026-03-02 00:34:56 +05:30
parent 78602c367e
commit b18ee0c5d3

View file

@ -646,16 +646,16 @@ class DiscordExporter:
msg_found = True msg_found = True
logger.debug(f"Found starter message {msg.id} for {thread.name}") logger.debug(f"Found starter message {msg.id} for {thread.name}")
# Save assets in the thread's own directory instead of the forum root # Save assets in the thread's own directory inside the forum directory
thread_asset_dir = forum_asset_dir / str(thread.id) thread_asset_dir = forum_asset_dir / str(thread.id)
thread_asset_dir.mkdir(parents=True, exist_ok=True) thread_asset_dir.mkdir(parents=True, exist_ok=True)
msg_data = await self._format_message( msg_data = await self._format_message(
msg, msg,
thread_asset_dir, thread_asset_dir,
str(thread.id), f"{channel_id}/{thread.id}", # Full relative path from message_backup/
avatar_dir, avatar_dir,
"../user_avatars" # Relative path up one more level "../../user_avatars" # Two levels up from {forum_id}/{thread_id}/
) )
# Override type and add title for forum starter messages # Override type and add title for forum starter messages
msg_data["type"] = "Thread_starter_message" msg_data["type"] = "Thread_starter_message"