debug info

This commit is contained in:
Nicolas Constant
2022-12-27 22:34:55 -05:00
parent 7c267063f9
commit 52da17393b

View File

@@ -59,17 +59,22 @@ namespace BirdsiteLive.Controllers
[HttpPost] [HttpPost]
public async Task<IActionResult> PostNote() public async Task<IActionResult> PostNote()
{ {
var username = "gra"; var username = "twitter";
var actor = $"https://{_instanceSettings.Domain}/users/{username}"; var actor = $"https://{_instanceSettings.Domain}/users/{username}";
var targetHost = "mastodon.technology"; var targetHost = "ioc.exchange";
var target = $"{targetHost}/users/testtest"; var target = $"https://{targetHost}/users/test";
var inbox = $"/users/testtest/inbox"; //var inbox = $"/users/testtest/inbox";
var inbox = $"/inbox";
var noteGuid = Guid.NewGuid(); var noteGuid = Guid.NewGuid();
var noteId = $"https://{_instanceSettings.Domain}/users/{username}/statuses/{noteGuid}"; var noteId = $"https://{_instanceSettings.Domain}/users/{username}/statuses/{noteGuid}";
var noteUrl = $"https://{_instanceSettings.Domain}/@{username}/{noteGuid}"; var noteUrl = $"https://{_instanceSettings.Domain}/@{username}/{noteGuid}";
var to = $"{actor}/followers"; var to = $"{actor}/followers";
to = target;
var cc = new[] { "https://www.w3.org/ns/activitystreams#Public" };
cc = new string[0];
var now = DateTime.UtcNow; var now = DateTime.UtcNow;
var nowString = now.ToString("s") + "Z"; var nowString = now.ToString("s") + "Z";
@@ -82,7 +87,7 @@ namespace BirdsiteLive.Controllers
actor = actor, actor = actor,
published = nowString, published = nowString,
to = new[] { to }, to = new[] { to },
//cc = new [] { "https://www.w3.org/ns/activitystreams#Public" }, cc = cc,
apObject = new Note() apObject = new Note()
{ {
id = noteId, id = noteId,
@@ -94,7 +99,8 @@ namespace BirdsiteLive.Controllers
// Unlisted // Unlisted
to = new[] { to }, to = new[] { to },
cc = new[] { "https://www.w3.org/ns/activitystreams#Public" }, cc = cc,
//cc = new[] { "https://www.w3.org/ns/activitystreams#Public" },
//// Public //// Public
//to = new[] { "https://www.w3.org/ns/activitystreams#Public" }, //to = new[] { "https://www.w3.org/ns/activitystreams#Public" },
@@ -102,8 +108,16 @@ namespace BirdsiteLive.Controllers
sensitive = false, sensitive = false,
content = "<p>TEST PUBLIC</p>", content = "<p>TEST PUBLIC</p>",
//content = "<p><span class=\"h-card\"><a href=\"https://ioc.exchange/users/test\" class=\"u-url mention\">@<span>test</span></a></span> test</p>",
attachment = new Attachment[0], attachment = new Attachment[0],
tag = new Tag[0] tag = new Tag[]{
new Tag()
{
type = "Mention",
href = target,
name = "@test@ioc.exchange"
}
},
} }
}; };
@@ -129,7 +143,7 @@ namespace BirdsiteLive.Controllers
[HttpPost] [HttpPost]
public async Task<IActionResult> PostDeleteUser() public async Task<IActionResult> PostDeleteUser()
{ {
var userName = "mastodon"; var userName = "twitter";
var host = "ioc.exchange"; var host = "ioc.exchange";
var inbox = "/inbox"; var inbox = "/inbox";