mirror of
https://github.com/g3rv4/FakeRelay.git
synced 2025-08-15 23:47:48 +02:00
@ -19,6 +19,7 @@ public static class MastodonHelper
|
|||||||
public static async Task<string> SendMessageToInboxAsync(string targetHost, string content)
|
public static async Task<string> SendMessageToInboxAsync(string targetHost, string content)
|
||||||
{
|
{
|
||||||
var client = new HttpClient();
|
var client = new HttpClient();
|
||||||
|
client.DefaultRequestHeaders.Add("User-Agent", $"FakeRelay (hosted at {Config.Instance.Host})");
|
||||||
|
|
||||||
var date = DateTime.UtcNow;
|
var date = DateTime.UtcNow;
|
||||||
|
|
||||||
@ -49,4 +50,4 @@ public static class MastodonHelper
|
|||||||
|
|
||||||
public static string GetActorWebFinger() =>
|
public static string GetActorWebFinger() =>
|
||||||
$@"{{""subject"": ""acct:relay@{Config.Instance.Host}"", ""aliases"": [""https://{Config.Instance.Host}/actor""], ""links"": [{{""href"": ""https://{Config.Instance.Host}/actor"", ""rel"": ""self"", ""type"": ""application/activity+json""}}, {{""href"": ""https://{Config.Instance.Host}/actor"", ""rel"": ""self"", ""type"": ""application/ld+json; profile=\""https://www.w3.org/ns/activitystreams\""""}}]}}";
|
$@"{{""subject"": ""acct:relay@{Config.Instance.Host}"", ""aliases"": [""https://{Config.Instance.Host}/actor""], ""links"": [{{""href"": ""https://{Config.Instance.Host}/actor"", ""rel"": ""self"", ""type"": ""application/activity+json""}}, {{""href"": ""https://{Config.Instance.Host}/actor"", ""rel"": ""self"", ""type"": ""application/ld+json; profile=\""https://www.w3.org/ns/activitystreams\""""}}]}}";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user