Skip to content

Commit ec9f84a

Browse files
authored
Force getting last secret revision in matrix-auth (#664)
1 parent eb3a4d3 commit ec9f84a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/charms/synapse/v1/matrix_auth.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def _on_config_changed(self, _) -> None:
6767

6868
# Increment this PATCH version before using `charmcraft publish-lib` or reset
6969
# to 0 if you are raising the major API version
70-
LIBPATCH = 0
70+
LIBPATCH = 4
7171

7272
# pylint: disable=wrong-import-position
7373
import json
@@ -195,7 +195,7 @@ def get_shared_secret(
195195
return None
196196
try:
197197
secret = model.get_secret(id=shared_secret_id)
198-
password = secret.get_content().get(SHARED_SECRET_CONTENT_LABEL)
198+
password = secret.get_content(refresh=True).get(SHARED_SECRET_CONTENT_LABEL)
199199
if not password:
200200
return None
201201
return SecretStr(password)
@@ -274,7 +274,7 @@ def get_encryption_key_secret(
274274
secret = model.get_secret(label=ENCRYPTION_KEY_SECRET_LABEL)
275275
else:
276276
secret = model.get_secret(id=encryption_key_secret_id)
277-
encryption_key = secret.get_content().get(ENCRYPTION_KEY_SECRET_CONTENT_LABEL)
277+
encryption_key = secret.get_content(refresh=True).get(ENCRYPTION_KEY_SECRET_CONTENT_LABEL)
278278
if not encryption_key:
279279
return None
280280
return encryption_key.encode('utf-8')

0 commit comments

Comments
 (0)