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(
|
||||
{ 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;
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue