mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-09 06:12:31 +00:00
Rework sync so uploading multiple files at once or several moderators uploading files simultaneously doesn't break synchronization. The current room metadata plugin operates on <key,value> pairs and we were using a generic "files" key and using a nested object as our value. Since with every operation the entire object is replaced it's easy to get out of sync because one needs to be sure to have the full state before overwriting it. This is not realistic. We'll look into making the metadata plugin more flexible in order to support add / delete operations also on nested objects, but for the time being the following will suffice: Use a key prefix, so each file has en entry in the room metadata, like so: "files.<the file ID> -> file metadata". This means that when a file is deleted we just empty the metadata. The metadata plugin doesn't currently support removing existing keys.
5 lines
115 B
TypeScript
5 lines
115 B
TypeScript
/**
|
|
* The key prefix for file sharing metadata in the conference.
|
|
*/
|
|
export const FILE_SHARING_PREFIX = 'files';
|