upd: make new posts be marked as NSFW if instance is marked as NSFW
Closes #226
This commit is contained in:
parent
9c6a7aed98
commit
4ca3c05487
@ -368,6 +368,14 @@ export class NoteCreateService implements OnApplicationShutdown {
|
||||
}
|
||||
}
|
||||
|
||||
if (user.host && !data.cw) {
|
||||
await this.federatedInstanceService.fetch(user.host).then(async i => {
|
||||
if (i.isNSFW) {
|
||||
data.cw = 'Instance is marked as NSFW';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const note = await this.insertNote(user, data, tags, emojis, mentionedUsers);
|
||||
|
||||
setImmediate('post created', { signal: this.#shutdownController.signal }).then(
|
||||
|
Loading…
Reference in New Issue
Block a user