fix(reactions) Updated payload sent to backend

Added jid

Instead of internal id send id from JWT
This commit is contained in:
robertpin 2021-10-27 15:03:41 +03:00 committed by vp8x8
parent b6047b9761
commit a6167997d8
2 changed files with 9 additions and 3 deletions

View File

@ -52,7 +52,7 @@ MiddlewareRegistry.register(store => next => action => {
*/
function _overwriteLocalParticipant(
{ dispatch, getState },
{ avatarURL, email, name, features }) {
{ avatarURL, email, id: jwtId, name, features }) {
let localParticipant;
if ((avatarURL || email || name)
@ -68,6 +68,9 @@ function _overwriteLocalParticipant(
if (email) {
newProperties.email = email;
}
if (jwtId) {
newProperties.jwtId = jwtId;
}
if (name) {
newProperties.name = name;
}

View File

@ -55,6 +55,8 @@ export async function sendReactionsWebhook(state: Object, reactions: Array<?stri
const { webhookProxyUrl: url } = state['features/base/config'];
const { conference } = state['features/base/conference'];
const { jwt } = state['features/base/jwt'];
const { connection } = state['features/base/connection'];
const jid = connection.getJid();
const localParticipant = getLocalParticipant(state);
const headers = {
@ -68,8 +70,9 @@ export async function sendReactionsWebhook(state: Object, reactions: Array<?stri
sessionId: conference.sessionId,
submitted: Date.now(),
reactions,
participantId: localParticipant.id,
participantName: localParticipant.name
participantId: localParticipant.jwtId,
participantName: localParticipant.name,
participantJid: jid
};
if (url) {