diff --git a/routers/slack.py b/routers/slack.py index 53684fc40..d845d9f75 100644 --- a/routers/slack.py +++ b/routers/slack.py @@ -384,7 +384,7 @@ def slack_get_response_for_msg_id( if not output_text: return {"status": "no_output"} + content = output_text[0] if remove_refs: - output_text = "".join(snippet for snippet, _ in parse_refs(output_text, [])) - - return {"status": "ok", "output_text": output_text} + content = "".join(snippet for snippet, _ in parse_refs(content, [])) + return {"status": "ok", "content": content} diff --git a/tests/test_slack.py b/tests/test_slack.py index dd83d35a2..ebe72ca96 100644 --- a/tests/test_slack.py +++ b/tests/test_slack.py @@ -48,4 +48,4 @@ def test_slack_get_response_for_msg_id(transactional_db): headers={"Authorization": f"Bearer {auth_token}"}, ) assert r.status_code == 200 - assert r.json().get("output_text") == ["hello, world!"] + assert r.json().get("content") == "hello, world!"