From: Christian Heller Date: Tue, 16 Sep 2025 00:53:00 +0000 (+0200) Subject: Enforce sortedness in joining/residents users listings. X-Git-Url: https://plomlompom.com/repos/process_efforts?a=commitdiff_plain;h=a4c65ceb633ae45d0bcbd5ac5041e25882818ff2;p=ircplom Enforce sortedness in joining/residents users listings. --- 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