From cab98cc9db0c627adf38f3c9d99ee2f1cd8da6f5 Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Fri, 22 Nov 2024 17:57:20 +0000 Subject: [PATCH] Fix source fallback falling back to the dataclass --- src/niobot/utils/sync_store.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/niobot/utils/sync_store.py b/src/niobot/utils/sync_store.py index c045393..5aaf549 100644 --- a/src/niobot/utils/sync_store.py +++ b/src/niobot/utils/sync_store.py @@ -316,7 +316,7 @@ async def insert_state_event( try: new_event = new_event.source["source"] except KeyError: - new_event = new_event + new_event = new_event.source self.log.warning( "Event %r does not have a source key, falling back to the event itself. This may result in " "an invalid replay.", @@ -376,7 +376,7 @@ async def insert_timeline_event( try: new_event = new_event.source["source"] except KeyError: - new_event = new_event + new_event = new_event.source self.log.warning( "Event %r does not have a source key, falling back to the event itself. This may result in " "an invalid replay.",