mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-08 21:33:10 +02:00
check prohibited words when editing note
This commit is contained in:
parent
764bbcf05b
commit
9c1437bdf9
1 changed files with 4 additions and 0 deletions
|
@ -275,6 +275,10 @@ export class NoteEditService implements OnApplicationShutdown {
|
|||
}
|
||||
}
|
||||
|
||||
if (this.utilityService.isKeyWordIncluded(data.cw ?? data.text ?? '', meta.prohibitedWords)) {
|
||||
throw new NoteEditService.ContainsProhibitedWordsError();
|
||||
}
|
||||
|
||||
const inSilencedInstance = this.utilityService.isSilencedHost((meta).silencedHosts, user.host);
|
||||
|
||||
if (data.visibility === 'public' && inSilencedInstance && user.host !== null) {
|
||||
|
|
Loading…
Reference in a new issue