diff --git a/matrix_keycloak_bot.py b/matrix_keycloak_bot.py index 80ba57d..b4b8c5f 100644 --- a/matrix_keycloak_bot.py +++ b/matrix_keycloak_bot.py @@ -45,8 +45,8 @@ log = logging.getLogger("keycloak_bot") # Custom Pickle-Backed Crypto Store for Persistence # ------------------------------------------------------------------------------ class PickleCryptoStore(MemoryCryptoStore): - def __init__(self, filepath: str): - super().__init__() + def __init__(self, filepath: str, account_id: str = "bot", pickle_key: str = ""): + super().__init__(account_id=account_id, pickle_key=pickle_key) self.filepath = filepath self.load() @@ -406,7 +406,7 @@ async def main(): # Initialize stores using Pickle and Custom Memory State Stores state_store = CustomMemoryStateStore(client.mxid) - crypto_store = PickleCryptoStore(CRYPTO_STORE_FILE) + crypto_store = PickleCryptoStore(CRYPTO_STORE_FILE, account_id=client.mxid) client.state_store = state_store client.crypto = OlmMachine(client, crypto_store, state_store)