summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/NoteEditService.ts
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-02-15 23:08:02 -0500
committerHazelnoot <acomputerdog@gmail.com>2025-02-20 09:57:48 -0500
commit292d3b92295d194856cb73c66ac097180f70deb8 (patch)
treedf6b16e1129817de94e31a002640f00e9fd0562d /packages/backend/src/core/NoteEditService.ts
parentmerge: TSVector based search provider (!910) (diff)
downloadsharkey-292d3b92295d194856cb73c66ac097180f70deb8.tar.gz
sharkey-292d3b92295d194856cb73c66ac097180f70deb8.tar.bz2
sharkey-292d3b92295d194856cb73c66ac097180f70deb8.zip
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
Diffstat (limited to 'packages/backend/src/core/NoteEditService.ts')
-rw-r--r--packages/backend/src/core/NoteEditService.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/backend/src/core/NoteEditService.ts b/packages/backend/src/core/NoteEditService.ts
index 24a99156d2..7851af86b7 100644
--- a/packages/backend/src/core/NoteEditService.ts
+++ b/packages/backend/src/core/NoteEditService.ts
@@ -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);