Fix transcript url

This commit is contained in:
2024-08-28 14:41:22 +02:00
parent 347abe2061
commit bd965cc5a1
2 changed files with 3 additions and 4 deletions

View File

@@ -145,5 +145,7 @@ class Settings(BaseSettings):
ZULIP_API_KEY: str | None = None ZULIP_API_KEY: str | None = None
ZULIP_BOT_EMAIL: str | None = None ZULIP_BOT_EMAIL: str | None = None
UI_BASE_URL: str = "http://localhost:3000"
settings = Settings() settings = Settings()

View File

@@ -31,10 +31,7 @@ def send_message_to_zulip(stream: str, topic: str, message: str):
def get_zulip_message(transcript: Transcript): def get_zulip_message(transcript: Transcript):
domain = ( transcript_url = f"{settings.UI_BASE_URL}/transcripts/{transcript.id}"
"http://localhost:3000" # Replace this with your deployment base URL if needed
)
transcript_url = f"{domain}/transcripts/{transcript.id}"
header_text = f"# Reflector {transcript.title or 'Unnamed recording'}\n\n" header_text = f"# Reflector {transcript.title or 'Unnamed recording'}\n\n"
header_text += f"**Date**: <time:{transcript.created_at.isoformat()}>\n" header_text += f"**Date**: <time:{transcript.created_at.isoformat()}>\n"