Skip to content

fix(relay): include p tags in kind:39000 for DM channels#482

Merged
tlongwell-block merged 1 commit intomainfrom
fix/dm-p-tags-in-metadata
May 5, 2026
Merged

fix(relay): include p tags in kind:39000 for DM channels#482
tlongwell-block merged 1 commit intomainfrom
fix/dm-p-tags-in-metadata

Conversation

@tlongwell-block
Copy link
Copy Markdown
Collaborator

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_events function emits kind:39000 for all channel types but only included p tags 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 is dm in the kind:39000 emission block. The members data 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 their p tags because the reconcile path never included them.

Testing

Verified on staging — all 37 DM channels now have correct p tags in their kind:39000 events.

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.
@tlongwell-block tlongwell-block enabled auto-merge (squash) May 5, 2026 19:03
@tlongwell-block tlongwell-block merged commit 4701bd6 into main May 5, 2026
14 checks passed
@tlongwell-block tlongwell-block deleted the fix/dm-p-tags-in-metadata branch May 5, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant