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] Fix null values in LDLocalizedString

authored by

Kopper and committed by
Laura Hausmann
26d86eee 67a8819a

+4 -2
+4 -2
Iceshrimp.Backend/Core/Federation/ActivityStreams/Types/LDValueObject.cs
··· 24 24 { 25 25 Values = []; 26 26 27 + if (value == null) return; 28 + 27 29 // this is required to create a non-Map field for non-JsonLD remotes. 28 30 Values.Add("", value); 29 31 ··· 31 33 { 32 34 language = NormalizeLanguageCode(language); 33 35 34 - if (language != null && language != "") 36 + if (!string.IsNullOrEmpty(language)) 35 37 Values.Add(language, value); 36 38 } 37 39 } ··· 284 286 285 287 public override void WriteJson(JsonWriter writer, LDLocalizedString? value, JsonSerializer serializer) 286 288 { 287 - if (value == null) 289 + if (value == null || value.Values.Count < 1) 288 290 { 289 291 writer.WriteNull(); 290 292 return;