Skip to content

Commit

Permalink
Merge pull request #718 from opentok/ECO-5904
Browse files Browse the repository at this point in the history
[ECO-5904] List of archives not properly updated when archive state changes
  • Loading branch information
Robert Hainer authored Nov 17, 2020
2 parents b8c40e1 + 4129d34 commit 0209070
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/archiveLocalStorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ class ArchiveLocalStorage {
const stringSessionInfo = await redis.get(this.roomNameKey);
const sessionInfo = JSON.parse(stringSessionInfo);
if (!sessionInfo.archives) sessionInfo.archives = {};
sessionInfo.archives[aArchive.id] = aArchive;

sessionInfo.archives[aArchive.id] = Object.assign(
sessionInfo.archives[aArchive.id] || {}, aArchive,
);

await redis.set(this.roomNameKey, JSON.stringify(sessionInfo));
this.sendBroadcastSignal(sessionInfo.archives);
}
Expand Down

0 comments on commit 0209070

Please sign in to comment.