remove mandatory CW logic from NoteCreateService and NoteEditService
This commit is contained in:
parent
d5e9be318b
commit
7814c6e54e
2 changed files with 3 additions and 24 deletions
|
|
@ -230,7 +230,6 @@ export class NoteEditService implements OnApplicationShutdown {
|
|||
host: MiUser['host'];
|
||||
isBot: MiUser['isBot'];
|
||||
noindex: MiUser['noindex'];
|
||||
mandatoryCW: MiUser['mandatoryCW'];
|
||||
}, editid: MiNote['id'], data: Option, silent = false): Promise<MiNote> {
|
||||
if (!editid) {
|
||||
throw new Error('fail');
|
||||
|
|
@ -397,15 +396,6 @@ export class NoteEditService implements OnApplicationShutdown {
|
|||
data.cw = null;
|
||||
}
|
||||
|
||||
// Apply mandatory CW, if applicable
|
||||
if (user.mandatoryCW) {
|
||||
if (!data.cw) {
|
||||
data.cw = user.mandatoryCW;
|
||||
} else if (!data.cw.includes(user.mandatoryCW)) {
|
||||
data.cw += `, ${user.mandatoryCW}`;
|
||||
}
|
||||
}
|
||||
|
||||
let tags = data.apHashtags;
|
||||
let emojis = data.apEmojis;
|
||||
let mentionedUsers = data.apMentions;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue