fix: allow flagging for abuse when filtering comments by user (#30346)
Abuse flagging is always supported, so allow abuse flagging even when no other actions are available due to the lack of a thread context in the comment api.
This commit is contained in:
@@ -99,8 +99,8 @@ def get_editable_fields(cc_content: Union[Thread, Comment], context: Dict) -> Se
|
||||
elif context.get("thread"):
|
||||
is_thread_closed = context["thread"]["closed"]
|
||||
else:
|
||||
# No editable fields when outside thread context
|
||||
return set()
|
||||
# Flagging/un-flagging is always available.
|
||||
return {"abuse_flagged"}
|
||||
|
||||
# Map each field to the condition in which it's editable.
|
||||
editable_fields = {
|
||||
|
||||
Reference in New Issue
Block a user