A post whose author cannot be shown is left out of a list, never a 500
The v1.19.0 deploy's tests failed where build.yml's passed. A test stored a public remote post with no author id, and when the public timeline test ran after it, MastodonMapper.Statuses looked that null up in its accounts and answered 500. The mapper now skips such a post, and the test stores a real author. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ELjqpznMFMNrJoJUj6K5p2
This commit is contained in:
1 parent
f6dbf71964
commit
123ba39520
2 files changed
+5
-3
No files matched your search
@@ -202,8 +202,8 @@ namespace PrivaPub.Api.Mastodon.Mappers
|
||||
|
||||
Status Map(PostEntity post)
|
||||
{
|
||||
if (!accounts.TryGetValue(AuthorOf(post), out var account))
|
||||
return default;
|
||||
if (AuthorOf(post) is not { } author || !accounts.TryGetValue(author, out var account))
|
||||
return default;//a post whose author we cannot show is left out, never a 500
|
||||
var status = new Status
|
||||
{
|
||||
Id = post.ID,
|
||||
|
||||
Reference in new issue
Block a user