This commit is contained in:
Timothy Jaeryang Baek 2025-03-26 01:11:12 -07:00
parent 1be6ad1250
commit c1a02ec7d8

View File

@ -287,7 +287,6 @@ def get_event_emitter(request_info, update_db=True):
to=session_id,
)
if update_db:
if "type" in event_data and event_data["type"] == "status":
Chats.add_message_status_to_chat_by_id_and_message_id(
@ -314,15 +313,15 @@ def get_event_emitter(request_info, update_db=True):
)
if "type" in event_data and event_data["type"] == "replace":
content = event_data.get("data", {}).get("content", "")
content = event_data.get("data", {}).get("content", "")
Chats.upsert_message_to_chat_by_id_and_message_id(
request_info["chat_id"],
request_info["message_id"],
{
"content": content,
},
)
Chats.upsert_message_to_chat_by_id_and_message_id(
request_info["chat_id"],
request_info["message_id"],
{
"content": content,
},
)
return __event_emitter__