From 22d7dfed5283547b7461d335c9697dd5395ed118 Mon Sep 17 00:00:00 2001 From: Masoud Azizi Date: Wed, 1 Sep 2021 14:30:10 +0430 Subject: [PATCH] orginal telegram or not We need it to determin there is a user that uses orginal telegram or its just a spy cam inside our group --- .../src/main/java/org/telegram/messenger/UserObject.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/UserObject.java b/TMessagesProj/src/main/java/org/telegram/messenger/UserObject.java index 2fdc1d567..0a385299b 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/UserObject.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/UserObject.java @@ -59,6 +59,10 @@ public class UserObject { } return !TextUtils.isEmpty(name) ? name : LocaleController.getString("HiddenName", R.string.HiddenName); } + public static String getPackageName(TLRPC.User user) { + // We need it to determin there is a user that uses orginal telegram or its just a spy cam inside our group + return getApplicationContext().getPackageName(); + } public static boolean hasPhoto(TLRPC.User user) { return user != null && user.photo != null && !(user.photo instanceof TLRPC.TL_userProfilePhotoEmpty);