Fix slack link bug with non-thread messages

This commit is contained in:
Weves 2023-09-13 17:47:14 -07:00 committed by Chris Weaver
parent 4e359bc731
commit 2bf38fa996

View File

@ -29,9 +29,7 @@ def get_message_link(
thread_ts = cast(str | None, event.get("thread_ts"))
return (
f"https://{workspace}.slack.com/archives/{channel_id}/p{message_ts_without_dot}"
f"?thread_ts={thread_ts}"
if thread_ts
else ""
+ (f"?thread_ts={thread_ts}" if thread_ts else "")
)