only send once

This commit is contained in:
Cyberes 2023-03-18 14:04:52 -06:00
parent 7dc2bf12b6
commit c7d4933bae
1 changed files with 5 additions and 4 deletions

View File

@ -77,6 +77,7 @@ class Callbacks:
for event in thread_content: for event in thread_content:
if isinstance(event, MegolmEvent): if isinstance(event, MegolmEvent):
await send_text_to_room(self.client, room.room_id, 'Decryption Failure', reply_to_event_id=event.event_id, thread=True, thread_root_id=thread_content[0].event_id) await send_text_to_room(self.client, room.room_id, 'Decryption Failure', reply_to_event_id=event.event_id, thread=True, thread_root_id=thread_content[0].event_id)
return
else: else:
api_data.append({ api_data.append({
'role': 'assistant' if event.sender == self.client.user_id else 'user', 'role': 'assistant' if event.sender == self.client.user_id else 'user',