home · contact · privacy
Enforce sortedness in joining/residents users listings.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 16 Sep 2025 00:53:00 +0000 (02:53 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 16 Sep 2025 00:53:00 +0000 (02:53 +0200)
ircplom/client_tui.py

index 8a8a166036f1cd06ed390ddb41c69e9441f69d26..96110690c6d7d576ecee9c2983c165b702abedb2 100644 (file)
@@ -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