mirror of
https://github.com/wrwrabbit/Partisan-Telegram-Android.git
synced 2026-04-30 21:19:33 +00:00
Update to 8.2.1 (2462)
This commit is contained in:
parent
09f95ec069
commit
1d379b9a7b
141 changed files with 11475 additions and 5394 deletions
|
|
@ -1490,6 +1490,10 @@ public class ChatObject {
|
|||
return (chat instanceof TLRPC.TL_channel || chat instanceof TLRPC.TL_channelForbidden) && chat.megagroup;
|
||||
}
|
||||
|
||||
public static boolean isChannelAndNotMegaGroup(TLRPC.Chat chat) {
|
||||
return isChannel(chat) && !isMegagroup(chat);
|
||||
}
|
||||
|
||||
public static boolean isMegagroup(int currentAccount, long chatId) {
|
||||
TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(chatId);
|
||||
return ChatObject.isChannel(chat) && chat.megagroup;
|
||||
|
|
@ -1569,6 +1573,11 @@ public class ChatObject {
|
|||
return chat instanceof TLRPC.TL_channel || chat instanceof TLRPC.TL_channelForbidden;
|
||||
}
|
||||
|
||||
public static boolean isChannelAndNotMegaGroup(long chatId, int currentAccount) {
|
||||
TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(chatId);
|
||||
return isChannelAndNotMegaGroup(chat);
|
||||
}
|
||||
|
||||
public static boolean isCanWriteToChannel(long chatId, int currentAccount) {
|
||||
TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(chatId);
|
||||
return ChatObject.canSendMessages(chat) || chat.megagroup;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue