ワードミュート (#6594)

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip
This commit is contained in:
syuilo 2020-07-27 13:34:20 +09:00 committed by GitHub
parent b5a1fdd4c7
commit cf43dd6ec5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 485 additions and 12 deletions

View file

@ -142,7 +142,11 @@ export const meta = {
desc: {
'ja-JP': 'ピン留めするページID'
}
}
},
mutedWords: {
validator: $.optional.arr($.arr($.str))
},
},
errors: {
@ -193,6 +197,10 @@ export default define(meta, async (ps, user, token) => {
if (ps.birthday !== undefined) profileUpdates.birthday = ps.birthday;
if (ps.avatarId !== undefined) updates.avatarId = ps.avatarId;
if (ps.bannerId !== undefined) updates.bannerId = ps.bannerId;
if (ps.mutedWords !== undefined) {
profileUpdates.mutedWords = ps.mutedWords;
profileUpdates.enableWordMute = ps.mutedWords.length > 0;
}
if (typeof ps.isLocked === 'boolean') updates.isLocked = ps.isLocked;
if (typeof ps.isBot === 'boolean') updates.isBot = ps.isBot;
if (typeof ps.carefulBot === 'boolean') profileUpdates.carefulBot = ps.carefulBot;