fix(bot): mark messages as read after processing
Added functionality to mark messages as read after processing events to enhance usability and tracking. Also corrected formatting in help command documentation by fixing escape characters.
This commit is contained in:
parent
6e1a50c606
commit
9545ca1218
2 changed files with 7 additions and 2 deletions
|
@ -244,6 +244,11 @@ class RSSBot:
|
|||
for eventtype, callback in EVENT_CALLBACKS.items():
|
||||
if isinstance(event, eventtype):
|
||||
await callback(room, event, self)
|
||||
|
||||
self.matrix_client.room_read_markers(
|
||||
room.room_id, event.event_id, event.event_id
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
self.logger.log(
|
||||
f"Error in event callback for {event.__class__}: {e}", "error"
|
||||
|
|
|
@ -8,9 +8,9 @@ async def command_help(room: MatrixRoom, event: RoomMessageText, bot):
|
|||
- !rssbot help - Show this message
|
||||
- !rssbot botinfo - Show information about the bot
|
||||
- !rssbot privacy - Show privacy information
|
||||
- !rssbot addfeed [--backfill] \<url\> - Bridges a new feed to the current room (optionally backfilling all current entries)
|
||||
- !rssbot addfeed [--backfill] <url> - Bridges a new feed to the current room (optionally backfilling all current entries)
|
||||
- !rssbot listfeeds - Lists all bridged feeds
|
||||
- !rssbot removefeed \<index|url\> - Removes a bridged feed given the numeric index from the listfeeds command or the URL of the feed
|
||||
- !rssbot removefeed <index|url> - Removes a bridged feed given the numeric index from the listfeeds command or the URL of the feed
|
||||
- !rssbot eventtype [text|notice] - Sets the event type for the current room, overriding the default event type
|
||||
"""
|
||||
|
||||
|
|
Loading…
Reference in a new issue