/** 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";
 }
Beispiel #2
0
 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;
 }
Beispiel #3
0
 public static boolean isCanWriteToChannel(int chatId) {
   TLRPC.Chat chat = MessagesController.getInstance().getChat(chatId);
   return chat != null && (chat.creator || chat.editor || chat.megagroup);
 }
Beispiel #4
0
 public static boolean isChannel(int chatId) {
   TLRPC.Chat chat = MessagesController.getInstance().getChat(chatId);
   return chat instanceof TLRPC.TL_channel || chat instanceof TLRPC.TL_channelForbidden;
 }