fix(restart): preserve channel metadata across /restart so reply lands in thread
cmd_restart only persisted channel + chat_id across the os.execv boundary, so when the new process announced "Restart completed" the OutboundMessage had no Slack thread_ts and the reply fell back to the channel root. Serialize msg.metadata into NANOBOT_RESTART_NOTIFY_METADATA, restore it on the RestartNotice, and forward it to OutboundMessage so the completion message follows the same routing as the original /restart invocation. Made-with: Cursor
This commit is contained in:
@@ -172,6 +172,7 @@ class ChannelManager:
|
||||
channel=notice.channel,
|
||||
chat_id=notice.chat_id,
|
||||
content=format_restart_completed_message(notice.started_at_raw),
|
||||
metadata=dict(notice.metadata or {}),
|
||||
),
|
||||
))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user