Skip to content

Commit

Permalink
Fix for external identities
Browse files Browse the repository at this point in the history
  • Loading branch information
sondreb committed Dec 22, 2024
1 parent ea0f1e3 commit 1990ac0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/app/services/relay.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,12 +521,13 @@ export class RelayService {

createEventsFromData(pubkey: string, data: any) {
const events = [];
const now = Math.floor(Date.now() / 1000);

if (data.profile) {
const ndkEvent = new NDKEvent();
ndkEvent.kind = NDKKind.Metadata;
ndkEvent.content = JSON.stringify({

// Create metadata object without identityTags
const metadata = {
name: data.profile.name,
display_name: data.profile.displayName,
about: data.profile.about,
Expand All @@ -535,7 +536,10 @@ export class RelayService {
nip05: data.profile.nip05,
lud16: data.profile.lud16,
website: data.profile.website,
});
};

ndkEvent.content = JSON.stringify(metadata);
ndkEvent.tags = []; // Initialize tags array

// Add identity tags if present
if (data.profile.identityTags) {
Expand Down

0 comments on commit 1990ac0

Please sign in to comment.