Hiyve Components - v1.0.0
    Preparing search index...

    Interface UseUserFilesBroadcastOptions

    interface UseUserFilesBroadcastOptions {
        localUserId: string;
        onChange?: (
            payload: UserFilesChangePayload,
            meta: UserFilesChangeMeta,
        ) => void;
    }
    Index

    Properties

    localUserId: string

    Local user's id. Used by the relay subprotocol to filter out the caller's own publishes (the relay echoes by default).

    onChange?: (payload: UserFilesChangePayload, meta: UserFilesChangeMeta) => void

    Called when a remote participant publishes a change. The payload tells you which kind of change occurred so you can optimize the response (e.g., for removed, drop the file from local state without a server fetch). meta.senderId is the relay-authenticated publisher — use it to gate trust when the payload claims to modify a file (the canonical check is "sender must own the file").