Java Code Examples for org.telegram.tgnet.TLRPC#TL_channelForbidden

The following examples show how to use org.telegram.tgnet.TLRPC#TL_channelForbidden . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ChatObject.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
public static boolean isMegagroup(TLRPC.Chat chat) {
    return (chat instanceof TLRPC.TL_channel || chat instanceof TLRPC.TL_channelForbidden) && chat.megagroup;
}
 
Example 2
Source File: ChatObject.java    From Telegram with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isKickedFromChat(TLRPC.Chat chat) {
    return chat == null || chat instanceof TLRPC.TL_chatEmpty || chat instanceof TLRPC.TL_chatForbidden || chat instanceof TLRPC.TL_channelForbidden || chat.kicked || chat.deactivated || chat.banned_rights != null && chat.banned_rights.view_messages;
}
 
Example 3
Source File: ChatObject.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isLeftFromChat(TLRPC.Chat chat) {
    return chat == null || chat instanceof TLRPC.TL_chatEmpty || chat instanceof TLRPC.TL_chatForbidden || chat instanceof TLRPC.TL_channelForbidden || chat.left || chat.deactivated;
}
 
Example 4
Source File: ChatObject.java    From Telegram with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isLeftFromChat(TLRPC.Chat chat) {
    return chat == null || chat instanceof TLRPC.TL_chatEmpty || chat instanceof TLRPC.TL_chatForbidden || chat instanceof TLRPC.TL_channelForbidden || chat.left || chat.deactivated;
}
 
Example 5
Source File: ChatObject.java    From Telegram-FOSS with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isChannel(int chatId, int currentAccount) {
    TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(chatId);
    return chat instanceof TLRPC.TL_channel || chat instanceof TLRPC.TL_channelForbidden;
}
 
Example 6
Source File: ChatObject.java    From Telegram-FOSS with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isMegagroup(TLRPC.Chat chat) {
    return (chat instanceof TLRPC.TL_channel || chat instanceof TLRPC.TL_channelForbidden) && chat.megagroup;
}
 
Example 7
Source File: ChatObject.java    From Telegram-FOSS with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isChannel(TLRPC.Chat chat) {
    return chat instanceof TLRPC.TL_channel || chat instanceof TLRPC.TL_channelForbidden;
}
 
Example 8
Source File: ChatObject.java    From Telegram-FOSS with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isNotInChat(TLRPC.Chat chat) {
    return chat == null || chat instanceof TLRPC.TL_chatEmpty || chat instanceof TLRPC.TL_chatForbidden || chat instanceof TLRPC.TL_channelForbidden || chat.left || chat.kicked || chat.deactivated;
}
 
Example 9
Source File: ChatObject.java    From Telegram with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isMegagroup(TLRPC.Chat chat) {
    return (chat instanceof TLRPC.TL_channel || chat instanceof TLRPC.TL_channelForbidden) && chat.megagroup;
}
 
Example 10
Source File: ChatObject.java    From Telegram-FOSS with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isLeftFromChat(TLRPC.Chat chat) {
    return chat == null || chat instanceof TLRPC.TL_chatEmpty || chat instanceof TLRPC.TL_chatForbidden || chat instanceof TLRPC.TL_channelForbidden || chat.left || chat.deactivated;
}
 
Example 11
Source File: ChatObject.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isChannel(int chatId, int currentAccount) {
    TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(chatId);
    return chat instanceof TLRPC.TL_channel || chat instanceof TLRPC.TL_channelForbidden;
}
 
Example 12
Source File: ChatObject.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isChannel(TLRPC.Chat chat) {
    return chat instanceof TLRPC.TL_channel || chat instanceof TLRPC.TL_channelForbidden;
}
 
Example 13
Source File: ChatObject.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isNotInChat(TLRPC.Chat chat) {
    return chat == null || chat instanceof TLRPC.TL_chatEmpty || chat instanceof TLRPC.TL_chatForbidden || chat instanceof TLRPC.TL_channelForbidden || chat.left || chat.kicked || chat.deactivated;
}
 
Example 14
Source File: ChatObject.java    From Telegram with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isChannel(TLRPC.Chat chat) {
    return chat instanceof TLRPC.TL_channel || chat instanceof TLRPC.TL_channelForbidden;
}
 
Example 15
Source File: ChatObject.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isLeftFromChat(TLRPC.Chat chat) {
    return chat == null || chat instanceof TLRPC.TL_chatEmpty || chat instanceof TLRPC.TL_chatForbidden || chat instanceof TLRPC.TL_channelForbidden || chat.left || chat.deactivated;
}
 
Example 16
Source File: ChatObject.java    From Telegram with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isNotInChat(TLRPC.Chat chat) {
    return chat == null || chat instanceof TLRPC.TL_chatEmpty || chat instanceof TLRPC.TL_chatForbidden || chat instanceof TLRPC.TL_channelForbidden || chat.left || chat.kicked || chat.deactivated;
}
 
Example 17
Source File: ChatObject.java    From Telegram with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isChannel(int chatId, int currentAccount) {
    TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(chatId);
    return chat instanceof TLRPC.TL_channel || chat instanceof TLRPC.TL_channelForbidden;
}
 
Example 18
Source File: ChatObject.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isChannel(TLRPC.Chat chat) {
    return chat instanceof TLRPC.TL_channel || chat instanceof TLRPC.TL_channelForbidden;
}
 
Example 19
Source File: ChatObject.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isNotInChat(TLRPC.Chat chat) {
    return chat == null || chat instanceof TLRPC.TL_chatEmpty || chat instanceof TLRPC.TL_chatForbidden || chat instanceof TLRPC.TL_channelForbidden || chat.left || chat.kicked || chat.deactivated;
}
 
Example 20
Source File: ChatObject.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isKickedFromChat(TLRPC.Chat chat) {
    return chat == null || chat instanceof TLRPC.TL_chatEmpty || chat instanceof TLRPC.TL_chatForbidden || chat instanceof TLRPC.TL_channelForbidden || chat.kicked || chat.deactivated || chat.banned_rights != null && chat.banned_rights.view_messages;
}