a fork of iceshrimp.net but a tweaked frontend to my personal liking. waow
fediverse social-media social iceshrimp fedi
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[backend/federation] Render ASActor canBite property

pancakes 5de8242a cfdc5967

+17 -1
+9 -1
Iceshrimp.Backend/Core/Federation/ActivityPub/UserRenderer.cs
··· 100 100 101 101 var pronouns = profile?.Pronouns != null ? new LDLocalizedString { Values = profile.Pronouns! } : null; 102 102 103 + var canBite = user.CanBite switch 104 + { 105 + User.BiteControl.Public => new ASLink($"{Constants.ActivityStreamsNs}#Public"), 106 + User.BiteControl.Followers => new ASLink($"{id}/followers"), 107 + _ => null 108 + }; 109 + 103 110 return new ASActor 104 111 { 105 112 Id = id, ··· 149 156 }, 150 157 Tags = tags, 151 158 Attachments = attachments, 152 - Pronouns = pronouns 159 + Pronouns = pronouns, 160 + CanBite = canBite 153 161 }; 154 162 } 155 163
+4
Iceshrimp.Backend/Core/Federation/ActivityStreams/Contexts/iceshrimp.json
··· 44 44 "speakAsCat": "https://joinfirefish.org/ns#speakAsCat", 45 45 46 46 "Bite": "https://ns.mia.jetzt/as#Bite", 47 + "canBite": { 48 + "@id": "https://ns.mia.jetzt/as#canBite", 49 + "@type": "@id" 50 + }, 47 51 "quoteUri": "http://fedibird.com/ns#quoteUri", 48 52 "EmojiReact": "http://litepub.social/ns#EmojiReact", 49 53 "pronouns": {
+4
Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASActor.cs
··· 139 139 [JC(typeof(LocalizedValueObjectConverter))] 140 140 public LDLocalizedString? Pronouns { get; set; } 141 141 142 + [J("https://ns.mia.jetzt/as#canBite")] 143 + [JC(typeof(ASLinkConverter))] 144 + public ASLink? CanBite { get; set; } 145 + 142 146 [JI] 143 147 public string? WebfingerAddress 144 148 {