Skip to content

Feat: Change comment readers when comment is deleted #2438

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

carlosmondra
Copy link
Member

@carlosmondra carlosmondra commented Nov 28, 2024

This PR shows a possible solution to the following problem:

When a comment is deleted, the readers of the comment remain unchanged. That means that the UI still renders the deleted comment because the param trash=true is also passed. The problem is that the revisions link is still visible and the edits remain accessible. One option is to change the readers of the comment so that the deleted Note does not appear for everyone. It is still unclear how the readers will be restored if the Note is restored. Also, I am not sure if the edits' readers should change or just hiding the revisions link is sufficient.

More context here: https://secure.helpscout.net/conversation/2773317204/1708

@@ -16,6 +16,20 @@ def process(client, edit, invitation):
comment = client.get_note(edit.note.id)
paper_group_id=f'{venue_id}/{submission_name}{submission.number}'

# Change comment readers to be only the author if the comment is deleted
# Domain admins can still see the comment
if comment.ddate:
Copy link
Member

Choose a reason for hiding this comment

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

why do you need to do this? could you please add a test for this?

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated the description of the PR. I don't have a complete solution for it, but I am willing to discuss alternatives.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks, what about making the edits not accesible if the note is deleted? I guess this can happen with other type of notes not only comments.

Copy link
Member Author

Choose a reason for hiding this comment

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

How do we make them not accessible? Do you mean in the backend? How do we do that? If we use ddate, what happens if a user passes trash=true?

Copy link
Member

Choose a reason for hiding this comment

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

I was thinking that only the owner of the note can see the edits if the note is deleted.

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.

2 participants