1

enter image description hereI created a message template for connectyCube, When I send the message with ConnectyCube.chat.send(recipient_id, msg); the message is received by the other user but the custom setting is undefined.

My problem is that I want to send the profile picture url and nickname with message to a group.

How can I receive the message with custom settings?

José
  • 32
  • 4

1 Answers1

0

https://developers.connectycube.com/js/messaging?id=sendreceive-chat-messages

Use the extension filed to store any property

const message = {
  type: dialog.type === 3 ? 'chat' : 'groupchat',
  body: "Hello",
  extension: {
    dialog_id: dialog.id,
    save_to_history: 1,
    url1: urlProfile1,
    url2: urlProfile2,
    some_data: someData
  },
  markable: 1
};

ConnectyCube.chat.send(recipientIdOrDialogJid, message);
ccvlad
  • 1
  • 1
  • Thank you very much, it worked on the message, but for the creation of dialog boxes. Can you help me? On the public dialog I had to add in the description my personal parameter, but for the private dialog, it's impossible, because i can't add a description on the private dialog. How do I add an object with the creation of the private dilog?? – José May 08 '20 at 13:54