Closed gustavopuga closed 4 years ago
Hi Rocket.Chat team.
I am using the Livechat API and REST API together to establish Omnichannel chats, but this combination produce two chest to the same guest/visitor:
The code that I use to register visitor (Livechat API):
RocketChat(function () { this.registerGuest({ token: guestToken, name: nome, email: email, department: departamento }); this.setCustomField('cpf', cpf); this.setCustomField('numeroDol', numeroDol); });
The call to the REST API using JQUERY to store room id:
$.ajax({ type: 'GET', url: "http://10.92.0.26:3000/api/v1/livechat/room", data: { "token": guestToken }, success: function (data) { RocketChat(function () { this.showWidget(); this.maximizeWidget(); }); document.getElementById("site").style.display = "block"; document.getElementById("iframe").src = "https://www.defensoria.sp.def.br/dpesp/Default.aspx?idPagina=1"; document.getElementById("login").style.display = "none"; setCookie("fm_rid", data.room._id, 1); }, error: function (data) { $("#alert").show(); }, });
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi Rocket.Chat team.
I am using the Livechat API and REST API together to establish Omnichannel chats, but this combination produce two chest to the same guest/visitor:
The code that I use to register visitor (Livechat API):
The call to the REST API using JQUERY to store room id: