add shadow-muting chat hiding feature (automatic flagging of public posts from shadow-muted players) - fixes 10851 (#11239)

* move existing tests for chatRevoked users to 'mute user' describe block

* give consistent names to chatRevoked tests and use const not let

* improve methods for restoring chat permissions to test users

* add tests for shadow-muting and define constants for flag-related numbers

* update user profile URLs and reverse private/public 'if' statements

* implement shadow muting in the API and schemas

* add interface for mods to turn shadow muting on/off for a user

- checkbox in the Hall
- icon in the user's profile

* mark chat posts as being shadow muted (marking is visible to mods only)

* convert Admin Tools in profile from icons to text; make crown icon a toggle

* move logic for displaying flag count to a computed property

* prevent chat notifications for shadow-muted posts
This commit is contained in:
Alys
2019-07-31 03:09:42 +10:00
committed by Matteo Pagliazzi
parent b4b9caed83
commit c80de38572
13 changed files with 375 additions and 112 deletions

View File

@@ -29,6 +29,9 @@ import {
SUPPORTED_SOCIAL_NETWORKS,
GUILDS_PER_PAGE,
PARTY_LIMIT_MEMBERS,
CHAT_FLAG_LIMIT_FOR_HIDING,
CHAT_FLAG_FROM_MOD,
CHAT_FLAG_FROM_SHADOW_MUTE,
} from './constants';
api.constants = {
@@ -40,6 +43,9 @@ api.constants = {
SUPPORTED_SOCIAL_NETWORKS,
GUILDS_PER_PAGE,
PARTY_LIMIT_MEMBERS,
CHAT_FLAG_LIMIT_FOR_HIDING,
CHAT_FLAG_FROM_MOD,
CHAT_FLAG_FROM_SHADOW_MUTE,
};
// TODO Move these under api.constants
api.maxLevel = MAX_LEVEL;