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] Use null-conditional assignment

+2 -4
+1 -2
Iceshrimp.Backend/Controllers/Mastodon/StatusController.cs
··· 543 543 foreach (var attr in request.MediaAttributes) 544 544 { 545 545 var file = attachments.FirstOrDefault(p => p.Id == attr.Id); 546 - if (file != null) 547 - file.Comment = attr.Description; 546 + file?.Comment = attr.Description; 548 547 } 549 548 550 549 await db.SaveChangesAsync();
+1 -2
Iceshrimp.Backend/Core/Federation/ActivityPub/ActivityFetcherService.cs
··· 223 223 { 224 224 var activity = await FetchActivityAsync(uri, actor, keypair); 225 225 var note = activity.OfType<ASNote>().FirstOrDefault(); 226 - if (note != null) 227 - note.VerifiedFetch = true; 226 + note?.VerifiedFetch = true; 228 227 return note; 229 228 } 230 229