MCPcopy
hub / github.com/vercel/hyper / sendSessionData

Function sendSessionData

lib/actions/sessions.ts:165–178  ·  view source on GitHub ↗
(uid: string | null, data: any, escaped?: boolean | null)

Source from the content-addressed store, hash-verified

163}
164
165export function sendSessionData(uid: string | null, data: any, escaped?: boolean | null) {
166 return (dispatch: HyperDispatch, getState: () => HyperState) => {
167 dispatch({
168 type: SESSION_USER_DATA,
169 data,
170 effect() {
171 // If no uid is passed, data is sent to the active session.
172 const targetUid = uid || getState().sessions.activeUid;
173
174 rpc.emit('data', {uid: targetUid, data, escaped});
175 }
176 });
177 };
178}

Callers 2

effectFunction · 0.90
onDataFunction · 0.90

Calls 1

dispatchFunction · 0.85

Tested by

no test coverage detected