From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: alina sireneva <alina@tei.pet>
Date: Thu, 23 Jul 2026 10:52:26 +0400
Subject: fix crash after transferring channel ownership

---
 .../src/main/java/org/telegram/ui/ChatUsersActivity.java        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatUsersActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatUsersActivity.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/ChatUsersActivity.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatUsersActivity.java
@@ -1493,7 +1493,7 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
                 return -1;
             }
             if (lhs instanceof TLRPC.ChannelParticipant && rhs instanceof TLRPC.ChannelParticipant) {
-                return (int) (MessageObject.getPeerId(((TLRPC.ChannelParticipant) lhs).peer) - MessageObject.getPeerId(((TLRPC.ChannelParticipant) rhs).peer));
+                return Long.compare(MessageObject.getPeerId(((TLRPC.ChannelParticipant) lhs).peer), MessageObject.getPeerId(((TLRPC.ChannelParticipant) rhs).peer));
             }
             return 0;
         });
