-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add field to all content response DTOs: canAuthUserModerate
#1043
Conversation
- All content response DTOs (entry, entry_comment, post, post_comment) now have a field `canLoggedInUserModerate` which indicates whether the loggedin user can moderate said content
Just a tiny change, but would you be able to change the field name to |
canLoggedInUserModerate
canAuthUserModerate
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested it out, and it looks like canAuthUserModerate
is null if it's not a first level comment. Here's an example you can look at (comments I can mod have "CAN MOD" next to them, it should be all of them though):
Different example API response just in case:
{"items":[{"commentId":2443650,"user":{"userId":3,"username":"jwr1","isBot":false,"isFollowedByUser":false,"isFollowerOfUser":false,"isBlockedByUser":false,"avatar":{"filePath":"8c\/ed\/8ced191f89b7ac9f3324e7ccffded73e52191b5a74583dece7e59b32986c7727.png","sourceUrl":"https:\/\/media.kbin.social\/media\/8c\/ed\/8ced191f89b7ac9f3324e7ccffded73e52191b5a74583dece7e59b32986c7727.png","storageUrl":"https:\/\/media.kbin.earth\/8c\/ed\/8ced191f89b7ac9f3324e7ccffded73e52191b5a74583dece7e59b32986c7727.png","altText":null,"width":512,"height":512,"blurHash":"LDF=2Y000i^i3rD$}X-p0g%2-nIp"},"apId":null,"apProfileId":null,"createdAt":"2023-12-20T20:56:35+00:00"},"magazine":{"magazineId":4,"name":"kbinEarth","icon":{"filePath":"da\/5a\/da5a4a142adbdb264772760f11e51ba35c200cdad41c92c882877e8fd41ea163.png","sourceUrl":null,"storageUrl":"https:\/\/media.kbin.earth\/da\/5a\/da5a4a142adbdb264772760f11e51ba35c200cdad41c92c882877e8fd41ea163.png","altText":null,"width":512,"height":512,"blurHash":"L73-Uhp2UbejZLaHksktUbf5l.aw"},"isUserSubscribed":true,"isBlockedByUser":false,"apId":null,"apProfileId":"http:\/\/kbin.earth\/m\/kbinEarth"},"entryId":267576,"parentId":null,"rootId":null,"image":null,"body":"I think I figured out the issue. Could anyone who\u0027s noticed their stuff not federating try to repost and make sure it works correctly?","lang":"en","isAdult":false,"uv":0,"dv":0,"favourites":1,"isFavourited":false,"userVote":0,"visibility":"visible","apId":null,"mentions":[],"tags":[],"createdAt":"2024-08-19T03:04:20+00:00","editedAt":null,"lastActive":"2024-08-19T10:42:30+00:00","childCount":1,"children":[{"commentId":2446959,"user":{"userId":123787,"username":"celeste","isBot":false,"isFollowedByUser":false,"isFollowerOfUser":true,"isBlockedByUser":false,"avatar":{"filePath":"5f\/a0\/5fa08ff78bfd76f3ecfb6a5c2c194ba554f8f0042a9da8384ec67236191724a2.jpg","sourceUrl":"https:\/\/media.kbin.social\/media\/5f\/a0\/5fa08ff78bfd76f3ecfb6a5c2c194ba554f8f0042a9da8384ec67236191724a2.jpg","storageUrl":"https:\/\/media.kbin.earth\/5f\/a0\/5fa08ff78bfd76f3ecfb6a5c2c194ba554f8f0042a9da8384ec67236191724a2.jpg","altText":null,"width":1080,"height":1619,"blurHash":"LEDl==%N00aeaeRja#oe00WA~pt7"},"apId":null,"apProfileId":null,"createdAt":"2024-05-11T18:21:06+00:00"},"magazine":{"magazineId":4,"name":"kbinEarth","icon":{"filePath":"da\/5a\/da5a4a142adbdb264772760f11e51ba35c200cdad41c92c882877e8fd41ea163.png","sourceUrl":null,"storageUrl":"https:\/\/media.kbin.earth\/da\/5a\/da5a4a142adbdb264772760f11e51ba35c200cdad41c92c882877e8fd41ea163.png","altText":null,"width":512,"height":512,"blurHash":"L73-Uhp2UbejZLaHksktUbf5l.aw"},"isUserSubscribed":true,"isBlockedByUser":false,"apId":null,"apProfileId":"http:\/\/kbin.earth\/m\/kbinEarth"},"entryId":267576,"parentId":2443650,"rootId":2443650,"image":null,"body":"It looks like comments are federating again for me!","lang":"en","isAdult":false,"uv":0,"dv":0,"favourites":2,"isFavourited":true,"userVote":0,"visibility":"visible","apId":null,"mentions":["@jwr1"],"tags":[],"createdAt":"2024-08-19T10:42:30+00:00","editedAt":null,"lastActive":"2024-08-19T10:42:30+00:00","childCount":0,"children":[],"canAuthUserModerate":null}],"canAuthUserModerate":true}],"pagination":{"count":1,"currentPage":1,"maxPage":1,"perPage":15}}
I updated the PR :) |
It looks like it is fixed for entry comments, but the issue still exists with post (microblog) comments. |
True, forgot about that. I will add it tomorrow
Am 19. August 2024 22:55:46 MESZ schrieb John Wesley ***@***.***>:
…It looks like it is fixed for entry comments, but the issue still exists with post (microblog) comments.
--
Reply to this email directly or view it on GitHub:
#1043 (comment)
You are receiving this because you were assigned.
Message ID: ***@***.***>
|
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tried this also, looks good to me!
canLoggedInUserModerate
which indicates whether the loggedin user can moderate said contentLink #1001