fix(relay): include p tags in kind:39000 for DM channels#482
Merged
tlongwell-block merged 1 commit intomainfrom May 5, 2026
Merged
fix(relay): include p tags in kind:39000 for DM channels#482tlongwell-block merged 1 commit intomainfrom
tlongwell-block merged 1 commit intomainfrom
Conversation
DM channels need participant pubkeys in the kind:39000 group metadata event so clients can resolve display names without a separate kind:39002 fetch. The reconcile path was emitting DM metadata without p tags, breaking DM display after the stale-event cleanup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
DM channels need participant pubkeys in the kind:39000 group metadata event so clients can resolve display names without a separate kind:39002 fetch.
The
emit_group_discovery_eventsfunction emits kind:39000 for all channel types but only includedptags in kind:39001 (admins) and kind:39002 (members). DM metadata events were missing participant pubkeys, causing DMs to render without names in the desktop and mobile clients.Fix
Add
["p", pubkey]tags for each member when the channel type isdmin the kind:39000 emission block. Themembersdata is already fetched at the top of the function — this just wires it into the metadata tags for DMs.Context
Discovered during the stale-event cleanup for #481. After soft-deleting old ephemeral-key events and re-emitting with the stable dev key via
reconcile_channel_events, DM channels lost theirptags because the reconcile path never included them.Testing
Verified on staging — all 37 DM channels now have correct
ptags in their kind:39000 events.