Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic Draft Event #1124

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

vitorpamplona
Copy link
Collaborator

@vitorpamplona vitorpamplona commented Mar 14, 2024

Adds a private draft event kind for any other event type. Clients can search by supported kinds via the k tag

Read here

@arthurfranca
Copy link
Contributor

It may be useful to require an one-letter tag set to an event id/address when it is a comment/reply/referrer draft or empty string when "root" draft, like ['r', '<referenced-event-id-or-address-or-empty-string>']. Then one can fetch the draft of a reply to a specifc note or fetch a root draft.

@vitorpamplona
Copy link
Collaborator Author

Good point, I have added anchor events. I don't think we can ask to have empty rs because this kind should work for non-kind1 events as well.

@staab
Copy link
Member

staab commented Mar 14, 2024

I almost like this, but the e/a tags make me think that this should probably not be generic; drafts should be specified by kind number on a case-by-case basis, since you may want to search for something other than the anchor.

@vitorpamplona
Copy link
Collaborator Author

vitorpamplona commented Mar 14, 2024

I almost like this, but the e/a tags make me think that this should probably not be generic; drafts should be specified by kind number on a case-by-case basis, since you may want to search for something other than the anchor.

People can add other tags to this event at will. These are just the basic ones. The k already filters out things a client can't parse anyway.

Copy link
Contributor

@jb55 jb55 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was looking to have encrypted url attachments but I think I can just add these to the inner draft and remove them when posting. This works for me!

@vitorpamplona
Copy link
Collaborator Author

@mikedilger curious to hear your feedback from the Private Relay list section here. The idea is to have a list of relays to store events that only the author should see. A private outbox if you will.

@alexgleason
Copy link
Member

I haven't looked too deeply yet. But I have a lot of these kind 31234 events being submitted to my relay. I wonder if it's creating an event for ever letter people type. 😂

Screenshot from 2024-06-22 10-23-45

@vitorpamplona
Copy link
Collaborator Author

vitorpamplona commented Jun 22, 2024 via email

@alexgleason
Copy link
Member

@vitorpamplona I've been having problems with uptime. I haven't been able to narrow it down yet, but I imagine this draft event isn't helping.

image

I get huge bursts of draft events, presumably when people on Amethyst are typing:

image

Is it really sending on every keystroke? It's not even debounced? That seems like a performance problem for both relays and users of Amethyst. It would make more sense to wait 5 seconds until the user has stopped typing to publish the draft event to other relays.

@vitorpamplona
Copy link
Collaborator Author

vitorpamplona commented Jun 24, 2024

It is denounced at every second. What's the chart saying? How many events are in that peak? I can't quite figure it out.

And what's the green line?

@bumi
Copy link

bumi commented Jul 30, 2024

fyi: I also see a lot of those events in our NWC only rely (we reject those events)

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.

6 participants