@Override public void onModuleLoad() { createUI(); log("Example IM Chat"); String self = PageAssist.getMeta("emite.user"); log("Current user: "******"emite.chat"); log("Chat with user: "******"Current state: " + state); } }); final ChatManager chatManager = ginjector.getChatManager(); input.addChangeHandler( new ChangeHandler() { @Override public void onChange(ChangeEvent event) { String msg = input.getText(); log("Message sent: " + msg); Chat chat = chatManager.open(uri(user)); chat.send(new Message(msg)); input.setText(""); } }); Chat chat = chatManager.open(uri(user)); chat.addMessageReceivedHandler( new MessageHandler() { @Override public void onMessage(MessageEvent event) { log("Message received: " + event.getMessage().getBody()); } }); }
public AvatarConfig getFromMeta() { return get(PageAssist.getMeta("hablar.avatarProvider")); }