Added official link to profile, fix #33

This commit is contained in:
Nicolas Constant 2021-01-11 01:34:19 -05:00
parent 5454d176dd
commit d3aac062f9
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
3 changed files with 19 additions and 0 deletions

View File

@ -23,5 +23,6 @@ namespace BirdsiteLive.ActivityPub
public Image icon { get; set; }
public Image image { get; set; }
public EndPoints endpoints { get; set; }
public UserAttachment[] attachment { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace BirdsiteLive.ActivityPub
{
public class UserAttachment
{
public string type { get; set; }
public string name { get; set; }
public string value { get; set; }
}
}

View File

@ -75,6 +75,15 @@ namespace BirdsiteLive.Domain
mediaType = "image/jpeg",
url = twitterUser.ProfileBannerURL
},
attachment = new []
{
new UserAttachment
{
type = "PropertyValue",
name = "Official",
value = $"<a href=\"https://twitter.com/{acct}\" rel=\"me nofollow noopener noreferrer\" target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">twitter.com/{acct}</span></a>"
}
},
endpoints = new EndPoints
{
sharedInbox = $"https://{_instanceSettings.Domain}/inbox"