Prefer direct copies for playback, saves and exports within verified device groups
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
if (typeof value === 'string') { if (value.length > 65536) return null; try { value = JSON.parse(value); } catch { return null; } }
|
||||
if (!value || typeof value !== 'object' || Array.isArray(value) || value.type !== 'direct') return null;
|
||||
const m = { type: 'direct', action: value.action };
|
||||
if (value.action === 'request') return id(value.to) && id(value.id) ? { ...m, to: value.to, id: value.id } : null;
|
||||
if (value.action === 'invite') {
|
||||
const f = file(value.file); if (!id(value.to) || !f) return null;
|
||||
return { ...m, to: value.to, file: f };
|
||||
|
||||
Reference in New Issue
Block a user