Dear colleagues, I am aware about Issue 2300 '[XMPP] support custom username 
and avatar', but do we have any work around how to update chat bot 
'nickname' or even vCard on GTalk server. For example, send nickname as a 
part of the first chat message ?

String xmppText = String.format(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><message from=\"%1$s\" 
to=\"%2$s\" type=\"chat\">" + 
"<body>%3$s</body>" + 
"<nick xmlns=\"http://jabber.org/protocol/nick\";>%4$s</nick>" +
"</message>", from.getId(), to.getId(), message, nickname);

Message xmppMessage = new MessageBuilder()
.asXml(true)
.withFromJid(from)
.withRecipientJids(to)
.withBody(xmppText)
.build();

SendResponse response = xmpp.sendMessage(xmppMessage);

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/xLID5XcjcRQJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to