Merge pull request #21465 from germanocaumo/fix-meeting-metadata

fix(client): convert meeting metadata to expected format
This commit is contained in:
Ramón Souza 2024-10-18 10:37:00 -03:00 committed by GitHub
commit 9001a7102b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,7 +17,12 @@ window.addEventListener('graphqlSubscription', (e) => {
const { data } = response;
if (data) {
const { metadata = [], voiceSettings } = data.meeting[0];
settings(metadata);
// convert metadata format to { key: value }
const result = metadata.reduce((acc, item) => {
acc[item.name] = item.value;
return acc;
}, {});
settings(result);
voiceConf(voiceSettings.voiceConf);
}
}