i try to save chat history on server side by using JS. With no luck.
According to SDK i need to use extension: {save_to_history: 1}
But i don't understand where to use it, so XML request will be correct.
Here is an code from JS chat example:
message = {
message: post,
name: chatUser.name,
avatar: chatUser.avatar,
fb: chatUser.fbID
};
message = Strophe.escapeNode(JSON.stringify(message));
if (userJID) {
params = {
to: userJID,
from: connection.jid,
type: 'chat'
};
connection.send($msg(params).c('body').t(message));
Plz advice!
No comments:
Post a Comment