diff --git a/Iceshrimp.Backend/Core/Federation/ActivityPub/ActivityHandlerService.cs b/Iceshrimp.Backend/Core/Federation/ActivityPub/ActivityHandlerService.cs index 0bef0d3f..73ce3574 100644 --- a/Iceshrimp.Backend/Core/Federation/ActivityPub/ActivityHandlerService.cs +++ b/Iceshrimp.Backend/Core/Federation/ActivityPub/ActivityHandlerService.cs @@ -264,7 +264,7 @@ public class ActivityHandlerService( if (announce.Object is not ASNote note) throw GracefulException.UnprocessableEntity("Invalid or unsupported announce object"); - var dbNote = await noteSvc.ResolveNoteAsync(note.Id, note.VerifiedFetch ? note : null); + var dbNote = await noteSvc.ResolveNoteAsync(note.Id, note); await noteSvc.CreateNoteAsync(resolvedActor, announce.GetVisibility(activity.Actor), renote: dbNote); return; } diff --git a/Iceshrimp.Backend/Core/Services/NoteService.cs b/Iceshrimp.Backend/Core/Services/NoteService.cs index f9d0c874..1f3b994f 100644 --- a/Iceshrimp.Backend/Core/Services/NoteService.cs +++ b/Iceshrimp.Backend/Core/Services/NoteService.cs @@ -1027,6 +1027,9 @@ public class NoteService( if (note != null) return note; + if (!fetchedNote?.VerifiedFetch ?? false) + fetchedNote = null; + fetchedNote ??= user != null ? await fetchSvc.FetchNoteAsync(uri, user) : await fetchSvc.FetchNoteAsync(uri); if (fetchedNote == null) @@ -1303,7 +1306,7 @@ public class NoteService( public async Task ReactToNoteAsync(ASNote note, User actor, string name) { - var dbNote = await ResolveNoteAsync(note.Id, note.VerifiedFetch ? note : null); + var dbNote = await ResolveNoteAsync(note.Id, note); if (dbNote == null) throw GracefulException.UnprocessableEntity("Failed to resolve reaction target"); @@ -1347,7 +1350,7 @@ public class NoteService( public async Task RemoveReactionFromNoteAsync(ASNote note, User actor, string name) { - var dbNote = await ResolveNoteAsync(note.Id, note.VerifiedFetch ? note : null); + var dbNote = await ResolveNoteAsync(note.Id, note); if (dbNote == null) return; await RemoveReactionFromNoteAsync(dbNote, actor, name); }