fix(reactions) Updated payload sent to backend
Added jid Instead of internal id send id from JWT
This commit is contained in:
parent
b6047b9761
commit
a6167997d8
|
@ -52,7 +52,7 @@ MiddlewareRegistry.register(store => next => action => {
|
||||||
*/
|
*/
|
||||||
function _overwriteLocalParticipant(
|
function _overwriteLocalParticipant(
|
||||||
{ dispatch, getState },
|
{ dispatch, getState },
|
||||||
{ avatarURL, email, name, features }) {
|
{ avatarURL, email, id: jwtId, name, features }) {
|
||||||
let localParticipant;
|
let localParticipant;
|
||||||
|
|
||||||
if ((avatarURL || email || name)
|
if ((avatarURL || email || name)
|
||||||
|
@ -68,6 +68,9 @@ function _overwriteLocalParticipant(
|
||||||
if (email) {
|
if (email) {
|
||||||
newProperties.email = email;
|
newProperties.email = email;
|
||||||
}
|
}
|
||||||
|
if (jwtId) {
|
||||||
|
newProperties.jwtId = jwtId;
|
||||||
|
}
|
||||||
if (name) {
|
if (name) {
|
||||||
newProperties.name = name;
|
newProperties.name = name;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,6 +55,8 @@ export async function sendReactionsWebhook(state: Object, reactions: Array<?stri
|
||||||
const { webhookProxyUrl: url } = state['features/base/config'];
|
const { webhookProxyUrl: url } = state['features/base/config'];
|
||||||
const { conference } = state['features/base/conference'];
|
const { conference } = state['features/base/conference'];
|
||||||
const { jwt } = state['features/base/jwt'];
|
const { jwt } = state['features/base/jwt'];
|
||||||
|
const { connection } = state['features/base/connection'];
|
||||||
|
const jid = connection.getJid();
|
||||||
const localParticipant = getLocalParticipant(state);
|
const localParticipant = getLocalParticipant(state);
|
||||||
|
|
||||||
const headers = {
|
const headers = {
|
||||||
|
@ -68,8 +70,9 @@ export async function sendReactionsWebhook(state: Object, reactions: Array<?stri
|
||||||
sessionId: conference.sessionId,
|
sessionId: conference.sessionId,
|
||||||
submitted: Date.now(),
|
submitted: Date.now(),
|
||||||
reactions,
|
reactions,
|
||||||
participantId: localParticipant.id,
|
participantId: localParticipant.jwtId,
|
||||||
participantName: localParticipant.name
|
participantName: localParticipant.name,
|
||||||
|
participantJid: jid
|
||||||
};
|
};
|
||||||
|
|
||||||
if (url) {
|
if (url) {
|
||||||
|
|
Loading…
Reference in New Issue