diff --git a/length_notifier/length_notifier.py b/length_notifier/length_notifier.py index 4c052fe..1356fed 100644 --- a/length_notifier/length_notifier.py +++ b/length_notifier/length_notifier.py @@ -210,14 +210,18 @@ class Counter(Gtk.Label): return False def _jid_allowed(self, current_jid: JID) -> bool: - jids = cast(str, self._config["JIDS"]) - assert isinstance(jids, str) + jids: list[str] | str = self._config["JIDS"] # type: ignore if not jids: # Not restricted to any JIDs return True - allowed_jids = jids.split(",") + # Check for both current and legacy settings format + if isinstance(jids, list): + allowed_jids = jids + else: + allowed_jids = jids.split(",") + for allowed_jid in allowed_jids: try: address = JID.from_string(allowed_jid.strip()) diff --git a/length_notifier/plugin-manifest.json b/length_notifier/plugin-manifest.json index 4e5ca17..9d1f68d 100644 --- a/length_notifier/plugin-manifest.json +++ b/length_notifier/plugin-manifest.json @@ -16,5 +16,5 @@ "gajim>=2.0.0" ], "short_name": "length_notifier", - "version": "1.6.1" + "version": "1.6.2" } \ No newline at end of file