MCPcopy Create free account
hub / github.com/block/buzz / handleOk

Method handleOk

desktop/src/shared/api/readOnlyRelayClient.ts:231–251  ·  view source on GitHub ↗
(eventId: string, success: boolean, message: string)

Source from the content-addressed store, hash-verified

229 }
230
231 private handleOk(eventId: string, success: boolean, message: string): void {
232 if (!this.authRequest || this.authRequest.pendingEventId !== eventId) {
233 return;
234 }
235
236 window.clearTimeout(this.authRequest.timeout);
237 const authRequest = this.authRequest;
238 this.authRequest = null;
239
240 if (success) {
241 authRequest.resolve();
242 return;
243 }
244
245 authRequest.reject(
246 message
247 ? new Error(message)
248 : new Error("Observer relay authentication rejected."),
249 );
250 this.disconnect();
251 }
252
253 private handleEose(subId: string): void {
254 const pending = this.histories.get(subId);

Callers 1

handleWsMessageMethod · 0.95

Calls 1

disconnectMethod · 0.95

Tested by

no test coverage detected