Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
123ba39520 |
No files matched your search
@@ -195,11 +195,13 @@ namespace PrivaPub.Tests.Federation
|
||||
entity.Members.Add(new GroupMember { AvatarId = bob.Id });
|
||||
await DB.Default.SaveAsync(entity, token);
|
||||
var outsider = new RemoteActor(_harness.Peer, "asked");
|
||||
await _harness.Remote.GetActor(outsider.Id, refresh: false, token);
|
||||
var outsiderAccount = await _harness.Remote.GetActor(outsider.Id, refresh: false, token);
|
||||
var asksFirst = new Post
|
||||
{
|
||||
ObjectURI = $"{Origin(outsider)}/notes/{Guid.NewGuid():N}",
|
||||
ActorURI = outsider.Id,
|
||||
GroupUserId = outsiderAccount.ID,
|
||||
AuthorAccountId = outsiderAccount.ID,
|
||||
IsFederatedCopy = true,
|
||||
Visibility = PostVisibility.Public,
|
||||
ContentHtml = "<p>ask me first</p>",
|
||||
|
||||
@@ -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