Broadcast a file-system change message to every other participant
in the relay context. Fire-and-forget — no ack, no retry — so it's
safe to call after every local mutation without backpressure
concerns. No-op when the relay isn't connected yet.
Pass { kind: 'removed', fileId } after a delete so receivers can
drop the file from local state instantly. Pass { kind: 'shared', fileId, file, sharedWith } after a share or unshare so receivers
apply the new ACL directly (no server refetch — bypasses the cloud
read-replica race that produced "shared but the student doesn't
see it"). Pass { kind: 'changed' } for everything else (rename /
move / content updates / folder ops); receivers refetch.
Broadcast a file-system change message to every other participant in the relay context. Fire-and-forget — no ack, no retry — so it's safe to call after every local mutation without backpressure concerns. No-op when the relay isn't connected yet.
Pass
{ kind: 'removed', fileId }after a delete so receivers can drop the file from local state instantly. Pass{ kind: 'shared', fileId, file, sharedWith }after a share or unshare so receivers apply the new ACL directly (no server refetch — bypasses the cloud read-replica race that produced "shared but the student doesn't see it"). Pass{ kind: 'changed' }for everything else (rename / move / content updates / folder ops); receivers refetch.