From 36bd41e238cfc9f36d27d677f1e576d2c6350500 Mon Sep 17 00:00:00 2001 From: Adam Moussa <166072409+amoussa1229@users.noreply.github.com> Date: Mon, 4 May 2026 20:04:31 -0400 Subject: [PATCH] Fix flat replies in DMs DM replies were threaded under Adam's message instead of appearing flat. Root cause: listener fell back to event["ts"] as thread_ts for new DMs, causing say() to post as a threaded reply. Removed the fallback so DMs always use flat messages with placeholder update. Closes #4 --- listener/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/listener/app.py b/listener/app.py index cd0ba43..c5ae779 100644 --- a/listener/app.py +++ b/listener/app.py @@ -64,7 +64,7 @@ def _get_coordination(channel, thread_ts): def _dispatch_conversation(text, thread_ts, channel, say, is_dm): placeholder_ts = None if is_dm: - result = say(text="Thinking...", thread_ts=thread_ts) + result = say(text="Thinking...") placeholder_ts = result["ts"] lambda_client.invoke( @@ -143,7 +143,7 @@ def handle_message(event, say): if not text: return - thread_ts = event.get("thread_ts") or event["ts"] + thread_ts = None _dispatch_conversation(text, thread_ts, event["channel"], say, is_dm=True)