[length_notifier] 1.6.2

This commit is contained in:
wurstsalat
2025-06-29 18:28:14 +02:00
parent 16a02f6b69
commit 49024db13c
2 changed files with 8 additions and 4 deletions

View File

@@ -210,14 +210,18 @@ class Counter(Gtk.Label):
return False return False
def _jid_allowed(self, current_jid: JID) -> bool: def _jid_allowed(self, current_jid: JID) -> bool:
jids = cast(str, self._config["JIDS"]) jids: list[str] | str = self._config["JIDS"] # type: ignore
assert isinstance(jids, str)
if not jids: if not jids:
# Not restricted to any JIDs # Not restricted to any JIDs
return True return True
# Check for both current and legacy settings format
if isinstance(jids, list):
allowed_jids = jids
else:
allowed_jids = jids.split(",") allowed_jids = jids.split(",")
for allowed_jid in allowed_jids: for allowed_jid in allowed_jids:
try: try:
address = JID.from_string(allowed_jid.strip()) address = JID.from_string(allowed_jid.strip())

View File

@@ -16,5 +16,5 @@
"gajim>=2.0.0" "gajim>=2.0.0"
], ],
"short_name": "length_notifier", "short_name": "length_notifier",
"version": "1.6.1" "version": "1.6.2"
} }