Merge pull request #36 from NicolasConstant/develop

0.3.2 PR
This commit is contained in:
Nicolas Constant 2021-01-09 20:54:06 +01:00 committed by GitHub
commit 4197b9b161
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

View file

@ -6,7 +6,7 @@ namespace BirdsiteLive.ActivityPub
public class Activity
{
[JsonProperty("@context")]
public string context { get; set; }
public object context { get; set; }
public string id { get; set; }
public string type { get; set; }
public string actor { get; set; }

View file

@ -115,7 +115,7 @@ namespace BirdsiteLive.Domain
}
};
var result = await _activityPubService.PostDataAsync(acceptFollow, followerHost, activity.apObject);
return result == HttpStatusCode.Accepted;
return result == HttpStatusCode.Accepted || result == HttpStatusCode.OK;
}
private string OnlyKeepRoute(string inbox, string host)
@ -159,7 +159,7 @@ namespace BirdsiteLive.Domain
}
};
var result = await _activityPubService.PostDataAsync(acceptFollow, followerHost, activity.apObject.apObject);
return result == HttpStatusCode.Accepted;
return result == HttpStatusCode.Accepted || result == HttpStatusCode.OK;
}
private async Task<SignatureValidationResult> ValidateSignature(string actor, string rawSig, string method, string path, string queryString, Dictionary<string, string> requestHeaders, string body)

View file

@ -49,7 +49,7 @@ namespace BirdsiteLive.Pipeline.Processors.SubTasks
var note = _statusService.GetStatus(user.Acct, tweet);
var result = await _activityPubService.PostNewNoteActivity(note, user.Acct, tweet.Id.ToString(), follower.Host, inbox);
if (result == HttpStatusCode.Accepted)
if (result == HttpStatusCode.Accepted || result == HttpStatusCode.OK)
syncStatus = tweet.Id;
else
throw new Exception("Posting new note activity failed");

View file

@ -51,7 +51,7 @@ namespace BirdsiteLive.Pipeline.Processors.SubTasks
var result =
await _activityPubService.PostNewNoteActivity(note, user.Acct, tweet.Id.ToString(), host, inbox);
if (result == HttpStatusCode.Accepted)
if (result == HttpStatusCode.Accepted || result == HttpStatusCode.OK)
syncStatus = tweet.Id;
else
throw new Exception("Posting new note activity failed");

View file

@ -4,7 +4,7 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
<UserSecretsId>d21486de-a812-47eb-a419-05682bb68856</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<Version>0.3.1</Version>
<Version>0.3.2</Version>
</PropertyGroup>
<ItemGroup>