This commit is contained in:
parent
f55d3b41b0
commit
07e87bc3c7
|
@ -61,10 +61,6 @@ class Callbacks:
|
|||
event: The event defining the message.
|
||||
"""
|
||||
# Extract the message text
|
||||
msg = event.body.strip().strip('\n')
|
||||
|
||||
logger.debug(f"Bot message received from {event.sender} in {room.room_id} --> {msg}")
|
||||
|
||||
await self.client.room_read_markers(room.room_id, event.event_id, event.event_id)
|
||||
|
||||
# Ignore messages from ourselves
|
||||
|
@ -81,6 +77,10 @@ class Callbacks:
|
|||
logger.debug(f'Skipping seen event: {event.event_id}')
|
||||
return
|
||||
|
||||
msg = event.body.strip().strip('\n')
|
||||
|
||||
logger.debug(f"Bot message received from {event.sender} in {room.room_id} --> {msg}")
|
||||
|
||||
# if room.member_count > 2:
|
||||
# has_command_prefix =
|
||||
# else:
|
||||
|
@ -91,6 +91,8 @@ class Callbacks:
|
|||
# room.member_count > 2 ... we assume a public room
|
||||
# room.member_count <= 2 ... we assume a DM
|
||||
# General message listener
|
||||
logger.info(is_thread(event))
|
||||
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue