profile: support kind 0 metadata events
#37
Merged
offbyn
merged 1 commits from profile-settings
into master
2 years ago
Loading…
Reference in New Issue
There is no content yet.
Delete Branch 'profile-settings'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Added simple profile form to the setting view to send kind 0
metdata such as: name, about and picture.
Part of #9
I am getting a "error" Notice, when submitting this form with 'could not parse command', but not sure what exactly triggers this. also for some reason could not catch the error text.
@ -6,2 +6,2 @@
pool.addRelay('wss://relay.nostr.info', {read: true, write: true});
pool.addRelay('wss://relay.damus.io', {read: true, write: true});
// pool.addRelay('wss://relay.nostr.info', {read: true, write: true});
// pool.addRelay('wss://relay.damus.io', {read: true, write: true});
please undo 🙏 otherwise my feed will be quite empty :)
will do, sorry, this is just for debugging.
I opened this PR to ask for help as I got stuck. added draft
@ -663,0 +695,4 @@
};
const sig = await signEvent(newProfile, privatekey).catch(console.error);
if (sig) {
const ev = await pool.publish({...newProfile, sig}, (status, url) => {
huh. i can't find
publish
method. did they replace it withsend
?f85fb82b8d
wrong repo :)
1b798b2eee/pool.js (L170)
profile: support kind 0 metadata eventsto draft: profile: support kind 0 metadata events 2 years agostrange, the notice error. let me check if there's any logs on relay.x1ddos.
ok, so the relay says parse error:
not sure yet what that means... going to look at
NostrMessage
in nostr-rs-relay.@offbyn i found the issue. turns out, nostr-rs-relay always expects the
tags
field, even if empty. so, this works:662de1b2b6
to0290eac31f
2 years agoomg thank you so much.
draft: profile: support kind 0 metadata eventsto profile: support kind 0 metadata events 2 years ago0290eac31f
to476bb8add6
2 years agoPTAL
lgtm
@ -61,1 +61,4 @@
</div> -->
<form action="#" name="profile" autocomplete="new-password">
<label for="name">name</label>
<input type="text" name="name" id="name" autocomplete="off" pattern="[a-zA-Z_0-9][a-zA-Z_\-0-9]+[a-zA-Z_0-9]">
would set the
id
to something more specific.name
is such a broad id. maybeprofile_name
? same for about and picture.👍 done
476bb8add6
todd1076489f
2 years agodd1076489f
toe2431c7e60
2 years agoe2431c7e60
into master 2 years agoReviewers
e2431c7e60
.Step 1:
From your project repository, check out a new branch and test the changes.Step 2:
Merge the changes and update on Gitea.