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/libmfm] Implement FEP-c16b

Kopper b2a147d7 219c8462

+29 -4
+1
FEDERATION.md
··· 60 60 + Remote custom emoji reactions are supported if two conditions are met: 61 61 * The `as:content` property is set to `:emoji@remoteinstance.tld:` or `emoji@remoteinstance.tld` 62 62 * The emoji `emoji` is already known from a post or reaction by a user on `remoteinstance.tld` 63 + - [FEP-c16b: Formatting MFM functions](https://codeberg.org/fediverse/fep/src/branch/main/fep/c16b/fep-c16b.md) 63 64 - [FEP-e232: Object Links](https://codeberg.org/fediverse/fep/src/branch/main/fep/e232/fep-e232.md) 64 65 + Specifically, inline quotes with the following `rel` attributes are supported: 65 66 * `misskey:_misskey_quote`
+4 -2
Iceshrimp.Backend/Core/Federation/ActivityPub/NoteRenderer.cs
··· 194 194 Closed = closed, 195 195 AnyOf = anyOf, 196 196 OneOf = oneOf, 197 - VotersCount = poll.VotersCount 197 + VotersCount = poll.VotersCount, 198 + HtmlMfm = true 198 199 }; 199 200 } 200 201 } ··· 221 222 : null, 222 223 MkQuote = quoteUri, 223 224 QuoteUri = quoteUri, 224 - QuoteUrl = quoteUri 225 + QuoteUrl = quoteUri, 226 + HtmlMfm = true 225 227 }; 226 228 } 227 229 }
+2 -1
Iceshrimp.Backend/Core/Federation/ActivityStreams/Contexts/iceshrimp.json
··· 48 48 "pronouns": { 49 49 "@id": "https://ns.pancakes.gay/as#pronouns", 50 50 "@container": "@language" 51 - } 51 + }, 52 + "htmlMfm": "https://w3id.org/fep/c16b#htmlMfm" 52 53 } 53 54 ] 54 55 }
+4
Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/ASNote.cs
··· 62 62 [JC(typeof(VC))] 63 63 public DateTime? UpdatedAt { get; set; } 64 64 65 + [J($"https://w3id.org/fep/c16b#htmlMfm")] 66 + [JC(typeof(VC))] 67 + public bool? HtmlMfm { get; set; } 68 + 65 69 [J($"{Constants.ActivityStreamsNs}#source")] 66 70 [JC(typeof(ASNoteSourceConverter))] 67 71 public ASNoteSource? Source { get; set; }
+18 -1
Iceshrimp.Backend/Core/Helpers/LibMfm/Conversion/MfmConverter.cs
··· 312 312 return el; 313 313 } 314 314 } 315 + case MfmFnNode fn: 316 + { 317 + var el = CreateInlineFormattingElement("span"); 318 + el.ClassList.Add($"mfm-{fn.Name}"); 319 + 320 + if (fn.Args != null) 321 + { 322 + foreach (var (key, value) in fn.Args) 323 + { 324 + // this should be safe given argument keys only support letters and digits 325 + // https://iceshrimp.dev/iceshrimp/Iceshrimp.MfmSharp/src/branch/dev/Iceshrimp.MfmSharp/MfmParser.cs#L572 326 + el.SetAttribute($"data-mfm-{key}", value); 327 + } 328 + } 329 + 330 + AppendChildren(el, node, mentions, host, usedMedia); 331 + return el; 332 + } 315 333 case MfmBoldNode: 316 334 { 317 335 var el = CreateInlineFormattingElement("b"); ··· 335 353 return el; 336 354 } 337 355 case MfmItalicNode: 338 - case MfmFnNode: 339 356 { 340 357 var el = CreateInlineFormattingElement("i"); 341 358 AddHtmlMarkup(el, "*");