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

Function handleArchiveChannel

desktop/src/testing/e2eBridge.ts:5410–5430  ·  view source on GitHub ↗
(
  args: { channelId: string },
  config: E2eConfig | undefined,
)

Source from the content-addressed store, hash-verified

5408}
5409
5410async function handleArchiveChannel(
5411 args: { channelId: string },
5412 config: E2eConfig | undefined,
5413) {
5414 const identity = getIdentity(config);
5415 if (!identity) {
5416 const channel = getMockChannel(args.channelId);
5417 channel.archived_at = new Date().toISOString();
5418 touchMockChannel(channel);
5419 return;
5420 }
5421
5422 await submitSignedEvent(config, {
5423 kind: 9002,
5424 content: "",
5425 tags: [
5426 ["h", args.channelId],
5427 ["archived", "true"],
5428 ],
5429 });
5430}
5431
5432async function handleUnarchiveChannel(
5433 args: { channelId: string },

Callers 1

handleMockCommandFunction · 0.85

Calls 4

getMockChannelFunction · 0.85
touchMockChannelFunction · 0.85
submitSignedEventFunction · 0.85
getIdentityFunction · 0.70

Tested by

no test coverage detected