add "reject quotes" toggle at user and instance level
+ improve, cleanup, and de-duplicate quote resolution + add warning message when quote cannot be loaded + add "process error" framework to display warnings when a note cannot be correctly loaded from another instance
This commit is contained in:
parent
93ffd4611c
commit
292d3b9229
36 changed files with 466 additions and 88 deletions
|
|
@ -140,6 +140,7 @@ type Option = {
|
|||
app?: MiApp | null;
|
||||
updatedAt?: Date | null;
|
||||
editcount?: boolean | null;
|
||||
processErrors?: string[] | null;
|
||||
};
|
||||
|
||||
@Injectable()
|
||||
|
|
@ -337,6 +338,9 @@ export class NoteEditService implements OnApplicationShutdown {
|
|||
}
|
||||
}
|
||||
|
||||
// Check quote permissions
|
||||
await this.noteCreateService.checkQuotePermissions(data, user);
|
||||
|
||||
// Check blocking
|
||||
if (this.isRenote(data) && !this.isQuote(data)) {
|
||||
if (data.renote.userHost === null) {
|
||||
|
|
@ -529,6 +533,7 @@ export class NoteEditService implements OnApplicationShutdown {
|
|||
|
||||
if (data.uri != null) note.uri = data.uri;
|
||||
if (data.url != null) note.url = data.url;
|
||||
if (data.processErrors !== undefined) note.processErrors = data.processErrors;
|
||||
|
||||
if (mentionedUsers.length > 0) {
|
||||
note.mentions = mentionedUsers.map(u => u.id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue