Skip to content

Commit 366668d

Browse files
committed
attempt to fix issue #2611
1 parent 6a30ba4 commit 366668d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

backend/chainlit/socket.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ async def connection_successful(sid):
182182
if context.session.thread_id_to_resume and config.code.on_chat_resume:
183183
thread = await resume_thread(context.session)
184184
if thread:
185+
await context.emitter.resume_thread(thread)
186+
185187
context.session.has_first_interaction = True
186188
await context.emitter.emit(
187189
"first_interaction",
@@ -193,7 +195,6 @@ async def connection_successful(sid):
193195
if "message" in step["type"]:
194196
chat_context.add(Message.from_dict(step))
195197

196-
await context.emitter.resume_thread(thread)
197198
return
198199
else:
199200
await context.emitter.send_resume_thread_error("Thread not found.")

0 commit comments

Comments
 (0)