[backend/core] Don't retry jobs with like/unlike note resolution failures
This commit is contained in:
parent
300c7d661c
commit
a951217664
1 changed files with 8 additions and 5 deletions
|
@ -601,7 +601,6 @@ public class NoteService(
|
||||||
|
|
||||||
var combinedAltText = data.Attachments?.Select(p => p.Comment).Where(c => c != null);
|
var combinedAltText = data.Attachments?.Select(p => p.Comment).Where(c => c != null);
|
||||||
note.CombinedAltText = combinedAltText != null ? string.Join(' ', combinedAltText) : null;
|
note.CombinedAltText = combinedAltText != null ? string.Join(' ', combinedAltText) : null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var isPollEdited = false;
|
var isPollEdited = false;
|
||||||
|
@ -1397,13 +1396,17 @@ public class NoteService(
|
||||||
|
|
||||||
public async Task LikeNoteAsync(ASNote note, User actor)
|
public async Task LikeNoteAsync(ASNote note, User actor)
|
||||||
{
|
{
|
||||||
var dbNote = await ResolveNoteAsync(note) ?? throw new Exception("Cannot register like for unknown note");
|
var dbNote = await ResolveNoteAsync(note) ??
|
||||||
|
throw GracefulException.UnprocessableEntity("Cannot register like for unknown note");
|
||||||
|
|
||||||
await LikeNoteAsync(dbNote, actor);
|
await LikeNoteAsync(dbNote, actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task UnlikeNoteAsync(ASNote note, User user)
|
public async Task UnlikeNoteAsync(ASNote note, User user)
|
||||||
{
|
{
|
||||||
var dbNote = await ResolveNoteAsync(note) ?? throw new Exception("Cannot unregister like for unknown note");
|
var dbNote = await ResolveNoteAsync(note) ??
|
||||||
|
throw GracefulException.UnprocessableEntity("Cannot unregister like for unknown note");
|
||||||
|
|
||||||
await UnlikeNoteAsync(dbNote, user);
|
await UnlikeNoteAsync(dbNote, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue