clean up
This commit is contained in:
parent
058c951424
commit
6aef12e825
3 changed files with 3 additions and 15 deletions
|
@ -48,10 +48,7 @@ namespace BirdsiteLive.Domain
|
|||
|
||||
public async Task<HttpStatusCode> PostNewNoteActivity(Note note, string username, string noteId, string targetHost, string targetInbox)
|
||||
{
|
||||
//var actor = $"https://{_instanceSettings.Domain}/users/{username}";
|
||||
var actor = UrlFactory.GetActorUrl(_instanceSettings.Domain, username);
|
||||
|
||||
//var noteUri = $"https://{_instanceSettings.Domain}/users/{username}/statuses/{noteId}";
|
||||
var noteUri = UrlFactory.GetNoteUrl(_instanceSettings.Domain, username, noteId);
|
||||
|
||||
var now = DateTime.UtcNow;
|
||||
|
|
|
@ -34,12 +34,8 @@ namespace BirdsiteLive.Domain
|
|||
|
||||
public Note GetStatus(string username, ExtractedTweet tweet)
|
||||
{
|
||||
//var actorUrl = $"https://{_instanceSettings.Domain}/users/{username}";
|
||||
var actorUrl = UrlFactory.GetActorUrl(_instanceSettings.Domain, username);
|
||||
//var noteId = $"https://{_instanceSettings.Domain}/users/{username}/statuses/{tweet.Id}";
|
||||
var noteId = UrlFactory.GetNoteUrl(_instanceSettings.Domain, username, tweet.Id.ToString());
|
||||
//var noteUrl = $"https://{_instanceSettings.Domain}/@{username}/{tweet.Id}";
|
||||
var noteUrl = noteId;
|
||||
var noteUrl = UrlFactory.GetNoteUrl(_instanceSettings.Domain, username, tweet.Id.ToString());
|
||||
|
||||
var to = $"{actorUrl}/followers";
|
||||
var apPublic = "https://www.w3.org/ns/activitystreams#Public";
|
||||
|
@ -52,8 +48,7 @@ namespace BirdsiteLive.Domain
|
|||
|
||||
var note = new Note
|
||||
{
|
||||
//id = $"{noteId}/activity",
|
||||
id = $"{noteId}",
|
||||
id = noteUrl,
|
||||
|
||||
published = tweet.CreatedAt.ToString("s") + "Z",
|
||||
url = noteUrl,
|
||||
|
@ -72,7 +67,6 @@ namespace BirdsiteLive.Domain
|
|||
attachment = Convert(tweet.Media),
|
||||
tag = extractedTags.tags
|
||||
};
|
||||
|
||||
|
||||
return note;
|
||||
}
|
||||
|
|
|
@ -157,6 +157,7 @@ namespace BirdsiteLive.Controllers
|
|||
return BadRequest();
|
||||
}
|
||||
|
||||
// Ensure lowercase
|
||||
name = name.ToLowerInvariant();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(domain) && domain != _settings.Domain)
|
||||
|
@ -173,8 +174,6 @@ namespace BirdsiteLive.Controllers
|
|||
subject = $"acct:{name}@{_settings.Domain}",
|
||||
aliases = new[]
|
||||
{
|
||||
//$"https://{_settings.Domain}/@{name}",
|
||||
//$"https://{_settings.Domain}/users/{name}"
|
||||
actorUrl
|
||||
},
|
||||
links = new List<WebFingerLink>
|
||||
|
@ -183,14 +182,12 @@ namespace BirdsiteLive.Controllers
|
|||
{
|
||||
rel = "http://webfinger.net/rel/profile-page",
|
||||
type = "text/html",
|
||||
//href = $"https://{_settings.Domain}/@{name}"
|
||||
href = actorUrl
|
||||
},
|
||||
new WebFingerLink()
|
||||
{
|
||||
rel = "self",
|
||||
type = "application/activity+json",
|
||||
//href = $"https://{_settings.Domain}/users/{name}"
|
||||
href = actorUrl
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue