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.

[frontend/api-models] Fix discarded query string modifications (ISH-864)

+11 -6
+3 -2
Iceshrimp.Frontend/Core/ControllerModels/AdminControllerModel.cs
··· 19 19 public Task<JsonObject?> GetActivityAsync(string uri, string? userId) 20 20 { 21 21 var query = new QueryString(); 22 - query.Add("uri", uri); 23 - if (userId != null) query.Add("userId", userId); 22 + query = query.Add("uri", uri); 23 + if (userId != null) 24 + query = query.Add("userId", userId); 24 25 return api.CallNullableAsync<JsonObject>(HttpMethod.Get, $"/admin/activities/fetch", query); 25 26 } 26 27
+6 -3
Iceshrimp.Frontend/Core/ControllerModels/NoteControllerModel.cs
··· 17 17 public Task<List<NoteResponse>?> GetNoteAscendantsAsync(string id, [DefaultValue(20)] [Range(1, 100)] int? limit) 18 18 { 19 19 var query = new QueryString(); 20 - if (limit.HasValue) query.Add("limit", limit.Value.ToString()); 20 + if (limit.HasValue) 21 + query = query.Add("limit", limit.Value.ToString()); 21 22 return api.CallNullableAsync<List<NoteResponse>>(HttpMethod.Get, $"/notes/{id}/ascendants", query); 22 23 } 23 24 24 25 public Task<List<NoteResponse>?> GetNoteDescendantsAsync(string id, [DefaultValue(20)] [Range(1, 100)] int? depth) 25 26 { 26 27 var query = new QueryString(); 27 - if (depth.HasValue) query.Add("depth", depth.Value.ToString()); 28 + if (depth.HasValue) 29 + query = query.Add("depth", depth.Value.ToString()); 28 30 return api.CallNullableAsync<List<NoteResponse>>(HttpMethod.Get, $"/notes/{id}/descendants", query); 29 31 } 30 32 ··· 58 60 public Task<ValueResponse?> RenoteNoteAsync(string id, NoteVisibility? visibility = null) 59 61 { 60 62 var query = new QueryString(); 61 - if (visibility.HasValue) query.Add("visibility", ((int)visibility.Value).ToString().ToLowerInvariant()); 63 + if (visibility.HasValue) 64 + query = query.Add("visibility", ((int)visibility.Value).ToString().ToLowerInvariant()); 62 65 return api.CallNullableAsync<ValueResponse>(HttpMethod.Post, $"/notes/{id}/renote", query); 63 66 } 64 67
+2 -1
Iceshrimp.Frontend/Core/ControllerModels/UserControllerModel.cs
··· 24 24 { 25 25 var query = new QueryString(); 26 26 query = query.Add("username", username); 27 - if (host != null) query = query.Add("host", host); 27 + if (host != null) 28 + query = query.Add("host", host); 28 29 return api.CallNullableAsync<UserResponse>(HttpMethod.Get, "/users/lookup", query); 29 30 } 30 31