(
args: {
channelId: string;
pubkey: string;
},
config: E2eConfig | undefined,
)
| 5548 | } |
| 5549 | |
| 5550 | async function handleRemoveChannelMember( |
| 5551 | args: { |
| 5552 | channelId: string; |
| 5553 | pubkey: string; |
| 5554 | }, |
| 5555 | config: E2eConfig | undefined, |
| 5556 | ) { |
| 5557 | const identity = getIdentity(config); |
| 5558 | if (!identity) { |
| 5559 | const channel = getMockChannel(args.channelId); |
| 5560 | channel.members = channel.members.filter( |
| 5561 | (member) => member.pubkey !== args.pubkey, |
| 5562 | ); |
| 5563 | syncMockChannel(channel); |
| 5564 | touchMockChannel(channel); |
| 5565 | syncMockRelayAgentsFromManagedAgents(); |
| 5566 | return; |
| 5567 | } |
| 5568 | |
| 5569 | await submitSignedEvent(config, { |
| 5570 | kind: 9001, |
| 5571 | content: "", |
| 5572 | tags: [ |
| 5573 | ["h", args.channelId], |
| 5574 | ["p", args.pubkey], |
| 5575 | ], |
| 5576 | }); |
| 5577 | } |
| 5578 | |
| 5579 | async function handleJoinChannel( |
| 5580 | args: { |
no test coverage detected