(
args: { channelId: string },
config: E2eConfig | undefined,
)
| 5408 | } |
| 5409 | |
| 5410 | async 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 | |
| 5432 | async function handleUnarchiveChannel( |
| 5433 | args: { channelId: string }, |
no test coverage detected