mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2026-04-24 06:05:19 +00:00
Replace requests with httpx
This commit is contained in:
@@ -362,13 +362,15 @@ async def transcript_post_to_zulip(
|
||||
message_updated = False
|
||||
if transcript.zulip_message_id:
|
||||
try:
|
||||
update_zulip_message(transcript.zulip_message_id, stream, topic, content)
|
||||
await update_zulip_message(
|
||||
transcript.zulip_message_id, stream, topic, content
|
||||
)
|
||||
message_updated = True
|
||||
except InvalidMessageError:
|
||||
pass
|
||||
|
||||
if not message_updated:
|
||||
response = send_message_to_zulip(stream, topic, content)
|
||||
response = await send_message_to_zulip(stream, topic, content)
|
||||
await transcripts_controller.update(
|
||||
transcript, {"zulip_message_id": response["id"]}
|
||||
)
|
||||
|
||||
@@ -27,7 +27,7 @@ async def zulip_get_streams(
|
||||
if not user:
|
||||
raise HTTPException(status_code=403, detail="Authentication required")
|
||||
|
||||
streams = get_zulip_streams()
|
||||
streams = await get_zulip_streams()
|
||||
return streams
|
||||
|
||||
|
||||
@@ -42,5 +42,5 @@ async def zulip_get_topics(
|
||||
if not user:
|
||||
raise HTTPException(status_code=403, detail="Authentication required")
|
||||
|
||||
topics = get_zulip_topics(stream_id)
|
||||
topics = await get_zulip_topics(stream_id)
|
||||
return topics
|
||||
|
||||
Reference in New Issue
Block a user