From a4c65ceb633ae45d0bcbd5ac5041e25882818ff2 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Tue, 16 Sep 2025 02:53:00 +0200 Subject: [PATCH] Enforce sortedness in joining/residents users listings. --- ircplom/client_tui.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ircplom/client_tui.py b/ircplom/client_tui.py index 8a8a166..9611069 100644 --- a/ircplom/client_tui.py +++ b/ircplom/client_tui.py @@ -237,9 +237,10 @@ class _UpdatingChannel(_UpdatingNode, Channel): return None assert update.key == 'user_ids' assert isinstance(update.value, set) - d = {'NUHS:joining': tuple(id_ for id_ in update.value - if id_ not in self.user_ids) - } if self.user_ids else {'NICKS:residents': tuple(update.value)} + d = ({'NUHS:joining': tuple(sorted(id_ for id_ in update.value + if id_ not in self.user_ids))} + if self.user_ids + else {'NICKS:residents': tuple(sorted(update.value))}) if super()._focused_set_and_report_change(old_value, update): return scope, d return None -- 2.30.2