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

Adding distinguish comment. Fixes #2002 #2391

Merged
merged 2 commits into from
Aug 17, 2022
Merged

Adding distinguish comment. Fixes #2002 #2391

merged 2 commits into from
Aug 17, 2022

Conversation

dessalines
Copy link
Member

No description provided.

@@ -184,6 +184,7 @@ impl ApubObject for ApubComment {
updated: note.updated.map(|u| u.naive_local()),
deleted: None,
ap_id: Some(note.id.into()),
distinguished: None, // TODO how to do this?
Copy link
Member Author

@dessalines dessalines Aug 5, 2022

Choose a reason for hiding this comment

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

@Nutomic Can you think of any field we could use for this? Or just ignore for now.

Copy link
Member

@Nutomic Nutomic Aug 5, 2022

Choose a reason for hiding this comment

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

I dont see any relevant field in activitystreams. You can just call it distinguished, and later we can migrate to a different name if needed. You will have to add the field in assets/lemmy/context.json, and to assets/lemmy/objects/note.json.

Keep in mind that we still dont federate admin status, so we cant verify that this was really sent by a mod/admin.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay I think I got those now.

@dessalines
Copy link
Member Author

K got this working on lemmy-ui too, it was easier than expected.

local_user_view.person.id,
orig_comment.community.id,
)
.await?;
Copy link
Member

Choose a reason for hiding this comment

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

So this means that admins/mods can distuingish any comment by another user? Then there should be some indication who did it.

But actually, i think that would make it less of a mod tool, and more like giving gold on reddit. Imo it would be better if admins/mods could only distinguish their own comments (when they are giving a warning or similar).

Copy link
Member Author

Choose a reason for hiding this comment

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

No, there's a check right above this one that makes sure they can only do these actions on their own comments.

@dessalines dessalines marked this pull request as ready for review August 5, 2022 18:39
@dessalines dessalines requested a review from Nutomic August 5, 2022 18:40
@Nutomic Nutomic enabled auto-merge (squash) August 17, 2022 11:13
@Nutomic Nutomic merged commit 870abf8 into main Aug 17, 2022
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