* Per-user custom emoji sets (kind:30030) the mock WS serves for * `listCustomEmoji` REQs. The workspace palette is the client-side UNION of * every member's own set (d=`buzz:custom-emoji`). We serve TWO member-authored * sets from distinct pubkeys so the e2e exercises the union/collapse path, no
()
| 573 | * second member's distinct emoji unions in. |
| 574 | */ |
| 575 | function createMockCustomEmojiSetEvents(): RelayEvent[] { |
| 576 | return [ |
| 577 | createMockEvent( |
| 578 | KIND_EMOJI_SET, |
| 579 | "", |
| 580 | [ |
| 581 | ["d", CUSTOM_EMOJI_SET_D_TAG], |
| 582 | ["emoji", "buzz", "https://example.com/e2e/buzz.png"], |
| 583 | // A relay-hosted emoji whose URL matches rewriteRelayUrl()'s pattern, |
| 584 | // used by the reaction guard to assert the proxy rewrite fires. |
| 585 | ["emoji", REACTION_EMOJI_SHORTCODE, REACTION_EMOJI_URL], |
| 586 | ], |
| 587 | // The current mock identity owns this set, so the settings card's |
| 588 | // "My emoji" section is non-empty and removable. |
| 589 | MOCK_IDENTITY_PUBKEY, |
| 590 | ), |
| 591 | createMockEvent( |
| 592 | KIND_EMOJI_SET, |
| 593 | "", |
| 594 | [ |
| 595 | ["d", CUSTOM_EMOJI_SET_D_TAG], |
| 596 | ["emoji", "narf", "https://example.com/e2e/narf.png"], |
| 597 | // member B claims :buzz: with a DIFFERENT url — unionCustomEmoji must |
| 598 | // collapse it to one deterministic winner, never expose two URLs. |
| 599 | ["emoji", "buzz", "https://example.com/e2e/buzz-b.png"], |
| 600 | ], |
| 601 | "b".repeat(64), |
| 602 | ), |
| 603 | ]; |
| 604 | } |
| 605 | |
| 606 | function updateMockRelayMembershipFromAdminEvent(event: RelayEvent): boolean { |
| 607 | const targetPubkey = event.tags |
no test coverage detected