This commit is contained in:
parent
4a7f557315
commit
629bce7576
|
@ -75,7 +75,10 @@ class Callbacks:
|
|||
return
|
||||
|
||||
if event.server_timestamp < self.startup_ts:
|
||||
logger.info(f'Skipping event as it was sent before startup time: {event.event_id}')
|
||||
logger.debug(f'Skipping event as it was sent before startup time: {event.event_id}')
|
||||
return
|
||||
if self.store.check_seen_event(event.event_id):
|
||||
logger.debug(f'Skipping seen event: {event.event_id}')
|
||||
return
|
||||
|
||||
# if room.member_count > 2:
|
||||
|
@ -88,7 +91,7 @@ class Callbacks:
|
|||
# room.member_count > 2 ... we assume a public room
|
||||
# room.member_count <= 2 ... we assume a DM
|
||||
# General message listener
|
||||
if not msg.startswith(f'{self.command_prefix} ') and is_thread(event) and not self.store.check_seen_event(event.event_id) and (await is_this_our_thread(self.client, room, event, self.command_prefix)):
|
||||
if not msg.startswith(f'{self.command_prefix} ') and is_thread(event) and (await is_this_our_thread(self.client, room, event, self.command_prefix)):
|
||||
await self.client.room_typing(room.room_id, typing_state=True, timeout=3000)
|
||||
thread_content = await get_thread_content(self.client, room, event)
|
||||
api_data = []
|
||||
|
@ -107,8 +110,6 @@ class Callbacks:
|
|||
'content': thread_msg if not thread_msg.startswith(self.command_prefix) else thread_msg[len(self.command_prefix):].strip()
|
||||
}) # if len(thread_content) >= 2 and thread_content[0].body.startswith(self.command_prefix): # if thread_content[len(thread_content) - 2].sender == self.client.user
|
||||
|
||||
logger.info(thread_content[0].event_id)
|
||||
|
||||
# TODO: process_chat() will set typing as false after generating.
|
||||
# TODO: If there is still another query in-progress that typing state will be overwritten by the one that just finished.
|
||||
async def inner():
|
||||
|
|
Loading…
Reference in New Issue