I am sending chat message with custom parameters to Quickblox api.
message: {
body: 'something',
date_sent: 'some date',
dialog_id: 'dialog id',
extension: {
save_to_history: 1,
},
markable: 1,
type: dialog.type === 3 ? 'chat' : 'groupchat',
customParameter: 'this is custom param',
},
I am sending this to quickblox like this
QB.chat.send(jidOrOpponentId, message);
When I receive that message on other browser, it comes without my custom parameter.
Does anybody know should this custom parameter be returned to me or not? If not, what is it for, anyway? I read the docs and there is a section on custom params,but there is no explanation on what are they for and should quickblox return them in response.
Try to put the customParameter
into the extension
object:
var msg = {
type: 'chat',
body: 'How are you today?',
extension: {
save_to_history: 1,
customParameter: 'Custom parameter'
}
};
var opponentId = 78;
QB.chat.send(opponentId, msg);