Skip to content

fix(people-lists): preserve data written by other Nostr clients #8729

Closed

Description

@NotThatKindOfDrLiz

Summary

Editing a NIP-51 people list rebuilds the complete kind-30000 event from UserList, deleting tag names, tag positions, and encrypted content the model does not represent.

Steps to Reproduce

  1. Read a kind-30000 people-list event containing an unmodelled tag, a p tag with a relay hint or other later position, or encrypted private items in content.
  2. Decode it through Nip51PeopleListCodec.decode.
  3. Publish an add/remove edit through PeopleListsRepositoryImpl, which calls Nip51PeopleListCodec.encode.
  4. Inspect the replacement event.

Actual Result

encode creates a new array containing only d, title, optional description/image, and minimal p tags. It also emits empty content. Metadata and private list items written by another Nostr client are silently removed from the parameterized-replaceable event.

Expected Result

A membership edit should preserve every untouched source tag, every untouched tag position, and the source content verbatim. Only the member being added or removed should change.

Regression?

Unknown. This is a latent interoperability and data-preservation defect in the current codec.

Evidence

mobile/packages/people_lists_repository/lib/src/nip51_people_list_codec.dart rebuilds the publish payload from UserList; mobile/packages/people_lists_repository/lib/src/people_lists_repository_impl.dart publishes that payload as the replacement event.

Discovered while applying the same preservation rule to kind 10003 in PR #8721.

Activity

  1. changed the title [-]fix(people-lists): preserve tags written by other Nostr clients[/-] [+]fix(people-lists): preserve data written by other Nostr clients[/+] on Sep 7, 2026
  2. moved this from Triage to In progress in Divine programon Sep 7, 2026
  3. moved this from In progress to Testing in Divine programon Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions