Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion backend/alembic/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def run_migrations_online() -> None:

asyncio.run(run_async_migrations())

migrate = os.getenv("APPLY_MIGRATIONS")
# migrate = os.getenv("APPLY_MIGRATIONS")
migrate = True
if migrate:
if context.is_offline_mode():
run_migrations_offline()
Expand Down
31 changes: 18 additions & 13 deletions backend/danswer/danswerbot/slack/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ def respond_in_thread(
slack_call = make_slack_api_rate_limited(client.chat_postMessage)
else:
slack_call = make_slack_api_rate_limited(client.chat_postEphemeral)

if not receiver_ids:
response = slack_call(
channel=channel,
Expand All @@ -158,19 +157,25 @@ def respond_in_thread(
if not response.get("ok"):
raise RuntimeError(f"Failed to post message: {response}")
else:
success = False
for receiver in receiver_ids:
response = slack_call(
channel=channel,
user=receiver,
text=text,
blocks=blocks,
thread_ts=thread_ts,
metadata=metadata,
unfurl_links=unfurl,
unfurl_media=unfurl,
)
if not response.get("ok"):
raise RuntimeError(f"Failed to post message: {response}")
try:
response = slack_call(
channel=channel,
user=receiver,
text=text,
blocks=blocks,
thread_ts=thread_ts,
metadata=metadata,
unfurl_links=unfurl,
unfurl_media=unfurl,
)
if response.get("ok"):
success = True
except:
pass
if not success:
raise RuntimeError(f"Failed to post message: {response}")


def build_feedback_id(
Expand Down
2 changes: 1 addition & 1 deletion backend/danswer/server/manage/slack_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def _form_channel_config(
if respond_tag_only is not None:
channel_config["respond_tag_only"] = respond_tag_only
if respond_team_member_list:
channel_config["respond_team_member_list"] = respond_team_member_list
channel_config["respond_team_member_list"] = [item.lower() for item in respond_team_member_list]
if respond_slack_group_list:
channel_config["respond_slack_group_list"] = respond_slack_group_list
if answer_filters:
Expand Down