Skip to content

fix(profile): guard metadata publish until existing metadata has loaded #291

@NotThatKindOfDrLiz

Description

@NotThatKindOfDrLiz

Summary

The profile edit form can submit before metadata has loaded from the current user query.

Problem

EditProfileForm currently builds the outgoing kind 0 payload with { ...metadata, ...values }. If metadata is still undefined when the user hits Save, we publish only the form values plus the Divine client tag. That can unintentionally drop untouched profile fields from the users kind 0 event.

Expected fix

  • Prevent profile saves until existing metadata has loaded, or
  • Add an equivalent submit guard that avoids publishing a partial kind 0 event when metadata is unavailable

Context

Follow-up from PR #289, which fixed kind 0 relay fan-out and display_name normalization but did not address this pre-existing race.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions