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

Build a reply without using p tags from parent event #653

Closed
dluvian opened this issue Nov 28, 2024 · 6 comments · Fixed by #773
Closed

Build a reply without using p tags from parent event #653

dluvian opened this issue Nov 28, 2024 · 6 comments · Fixed by #773
Labels
enhancement New feature or request
Milestone

Comments

@dluvian
Copy link
Contributor

dluvian commented Nov 28, 2024

Describe the enhancement

Add a way to build a reply with EventBuilder::text_note_reply without using the p tags from the parent event

Use case

Prevents hell threads, where every new reply tags all the participants of the whole thread. In my opinion only the parent and grandparent authors should be tagged

Additional context

@dluvian dluvian added the enhancement New feature or request label Nov 28, 2024
@dluvian
Copy link
Contributor Author

dluvian commented Nov 28, 2024

Same with EventBuilder::comment

@yukibtc yukibtc added this to the Release v0.38 milestone Nov 28, 2024
@yukibtc yukibtc modified the milestones: Release v0.38, Release v0.39 Dec 23, 2024
@dluvian
Copy link
Contributor Author

dluvian commented Dec 30, 2024

EventBuilder::text_note_reply is duplicating p-tags like crazy. Can you make a quick fix to make p-tags distinct? Every p-tag should only be present once. @yukibtc

@yukibtc yukibtc modified the milestones: Release v0.39, Release v0.38 Dec 30, 2024
@dluvian
Copy link
Contributor Author

dluvian commented Dec 30, 2024

I didn't test it but I think EventBuilder::comment is also duplicating p-tags

@dluvian
Copy link
Contributor Author

dluvian commented Dec 30, 2024

Also EventBuilder::comment is not setting a p-tag for the parent's author pubkey, but it should

yukibtc added a commit that referenced this issue Dec 30, 2024
…r::comment`

Ref #653 (comment)

Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc added a commit that referenced this issue Dec 30, 2024
…:comment`

#653 (comment)
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
@yukibtc yukibtc modified the milestones: Release v0.38, Release v0.39 Dec 30, 2024
@yukibtc
Copy link
Member

yukibtc commented Dec 30, 2024

Also EventBuilder::comment is not setting a p-tag for the parent's author pubkey, but it should

This is fixed in 88d949d

yukibtc added a commit that referenced this issue Dec 30, 2024
…r::comment`

Ref #653 (comment)

Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
@yukibtc yukibtc modified the milestones: Release v0.39, Release v0.40 Jan 30, 2025
@dluvian
Copy link
Contributor Author

dluvian commented Feb 15, 2025

Maybe via a policy enum of PTagPolicy{All, ParentAuthorOnly, Subset(usize), None}. I would only be interested in Subset(usize) to prevent hellthreads. None is useful for silent comments which don't notify the parent author.

yukibtc added a commit that referenced this issue Feb 18, 2025
- Tag only the most significant stuff (`e` and `p` tag of the reply_to and root events)
- Update unit test

Closes #653

Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc added a commit that referenced this issue Feb 18, 2025
- Tag only the most significant stuff (`e` and `p` tag of the reply_to and root events)
- Update unit test

Closes #653

Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc added a commit that referenced this issue Feb 18, 2025
- Tag only the most significant stuff (`e` and `p` tag of the reply_to and root events)
- Update unit test

Closes #653

Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc added a commit that referenced this issue Feb 18, 2025
- Tag only the most significant stuff (`e` and `p` tag of the reply_to and root events)
- Update unit test

Closes #653

Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc added a commit that referenced this issue Feb 18, 2025
- Tag only the most significant stuff (`e` and `p` tag of the reply_to and root events)
- Update unit test

Closes #653

Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc added a commit that referenced this issue Feb 19, 2025
- Tag only the most significant stuff (`e` and `p` tag of the reply_to and root events)
- Update unit test

Closes #653

Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc added a commit that referenced this issue Feb 19, 2025
- Tag only the most significant stuff (`e` and `p` tag of the reply_to and root events)
- Update unit test

Closes #653

Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
yukibtc added a commit that referenced this issue Feb 19, 2025
- Improve p-tagging in `EventBuilder::comment`
- Avoid unnecessary tagging in `EventBuilder::text_note_reply`

Closes #653
Closes #757
Pull-Request: #773

Acked-by: dluvian <dluvian@proton.me>
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants