Error inviting a contact to a bubble
Hello, I am getting strange error message "Cannot read property 'forEach' of undefined" when inviting a contact to a bubble. Bubble was successfully created. Valid contact object was invited
Would you please advise what is wrong. Thank you very much
Best regards
Valeri
-
Hi Vincent,
my environment Sandbox and Node.JS SDK. SDK version: 1.52.0
I noticed that this code creates two bubbles with the same name.
function createBubble(){let withHistory = true; // Allow newcomers to have access to the bubble messages since the creation of the bubblelet bubbleName = "New bubble"let bubbleDescription = "Test bubble";let newBubble = rainbowSDK.bubbles.createBubble(bubbleName, bubbleDescription, withHistory).then(function(bubble) {console.log("New bubble created");}).catch(function(err) {console.log("Error creating new bubble: " + err.msg);});}it is strangeThanksBest regardsValeri -
Hi Vincent,
Finally i solved the problem. It was my mistake, of course. In that line newBubble was undefined. I should have been used bubble instead of newBubble.
rainbowSDK.bubbles.inviteContactToBubble(contact, newBubble, false, true, " test reason").then(function(bubbleUpdated) {
it worked
rainbowSDK.bubbles.inviteContactToBubble(contact, bubble, false, true, " test reason").then(function(bubbleUpdated) {
Best regards
Valeri
Please sign in to leave a comment.
Comments
3 comments