private void onMessage(MessageSendCmd.Response response) { if (response.message.sender.id == self.id) { System.out.println("onMessage: ignoring self message = " + response.message); } else { System.out.println("onMessage: " + response.message); ChatView curUI = ChatView.clientUIMap.get(response.chatId); curUI.appendMessage(response.message.sender.name, response.message.text); } }
private void onJoinChat(JoinChatCmd.Response response) { System.out.println("onJoinChat: start listening chat = " + response.chat); subscribedChats.add(response.chat); client.joinChat(response.chat.address); ChatView.runUI(client, response.chat); }