New moderation tools: block & mute (#5572)
* initial support for block/mute * hide blocked + muted content everywhere * add info message for blocked/muted characteristics * sort blocked list by most recent block first * add 'blocked' message on channel page for channels that you have blocked * cleanup * delete unused files * always pass mute/block list to claim_search on homepage * PR cleanup
This commit is contained in:
parent
277a1d5d1f
commit
ea74a66dbd
75 changed files with 1115 additions and 877 deletions
|
@ -6,6 +6,8 @@ const Comments = {
|
|||
enabled: Boolean(COMMENT_SERVER_API),
|
||||
|
||||
moderation_block: (params: ModerationBlockParams) => fetchCommentsApi('moderation.Block', params),
|
||||
moderation_unblock: (params: ModerationBlockParams) => fetchCommentsApi('moderation.UnBlock', params),
|
||||
moderation_block_list: (params: ModerationBlockParams) => fetchCommentsApi('moderation.BlockedList', params),
|
||||
comment_list: (params: CommentListParams) => fetchCommentsApi('comment.List', params),
|
||||
comment_abandon: (params: CommentAbandonParams) => fetchCommentsApi('comment.Abandon', params),
|
||||
};
|
||||
|
@ -30,8 +32,8 @@ function fetchCommentsApi(method: string, params: {}) {
|
|||
};
|
||||
|
||||
return fetch(url, options)
|
||||
.then(res => res.json())
|
||||
.then(res => res.result);
|
||||
.then((res) => res.json())
|
||||
.then((res) => res.result);
|
||||
}
|
||||
|
||||
export default Comments;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue