/** Salva registro */ public String gravar() { System.out.println("Entrou no gravar!"); if (!project.getIdentification().equals(StringUtils.EMPTY)) { projectService.gravar(getProject()); MessagesController.msgProjetoCadastrado(); atualizarTela(); } else { MessagesController.msgFormIncorreto(); } return "project"; }
public static TLRPC.Chat getChatByDialog(long did) { int lower_id = (int) did; int high_id = (int) (did >> 32); if (lower_id < 0) { return MessagesController.getInstance().getChat(-lower_id); } return null; }
public static boolean isCanWriteToChannel(int chatId) { TLRPC.Chat chat = MessagesController.getInstance().getChat(chatId); return chat != null && (chat.creator || chat.editor || chat.megagroup); }
public static boolean isChannel(int chatId) { TLRPC.Chat chat = MessagesController.getInstance().getChat(chatId); return chat instanceof TLRPC.TL_channel || chat instanceof TLRPC.TL_channelForbidden; }