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/api] Implement TimelineController.GetListTimeline

+25
+21
Iceshrimp.Backend/Controllers/Web/TimelineController.cs
··· 142 142 return await noteRenderer.RenderManyAsync(notes.EnforceRenoteReplyVisibility(), user); 143 143 } 144 144 145 + [HttpGet("list/{id}")] 146 + [ProducesResults(HttpStatusCode.OK)] 147 + public async Task<IEnumerable<NoteResponse>> GetListTimeline(string id, PaginationQuery pq) 148 + { 149 + var user = HttpContext.GetUserOrFail(); 150 + 151 + if (!await db.UserLists.AnyAsync(p => p.Id == id && p.User == user)) 152 + throw GracefulException.NotFound("List not found"); 153 + 154 + var notes = await db.Notes.IncludeCommonProperties() 155 + .Where(p => db.UserListMembers.Any(l => l.UserListId == id && l.UserId == p.UserId)) 156 + .EnsureVisibleFor(user) 157 + .FilterHidden(user, db) 158 + .FilterMutedThreads(user, db) 159 + .Paginate(pq, ControllerContext) 160 + .PrecomputeVisibilities(user) 161 + .ToListAsync(); 162 + 163 + return await noteRenderer.RenderManyAsync(notes.EnforceRenoteReplyVisibility(), user); 164 + } 165 + 145 166 [HttpGet("remote/{instance}")] 146 167 [ProducesResults(HttpStatusCode.OK)] 147 168 public async Task<IEnumerable<NoteResponse>> GetRemoteTimeline(string instance, PaginationQuery pq)
+4
Iceshrimp.Frontend/Core/ControllerModels/TimelineControllerModel.cs
··· 31 31 api.CallAsync<List<NoteResponse>>(HttpMethod.Get, "/timelines/bookmarks", pq); 32 32 33 33 [LinkPagination(20, 80)] 34 + public Task<List<NoteResponse>> GetListTimelineAsync(string listId, PaginationQuery pq) => 35 + api.CallAsync<List<NoteResponse>>(HttpMethod.Get, $"/timelines/list/{listId}", pq); 36 + 37 + [LinkPagination(20, 80)] 34 38 public Task<List<NoteResponse>> GetRemoteTimelineAsync(string instance, PaginationQuery pq) => 35 39 api.CallAsync<List<NoteResponse>>(HttpMethod.Get, $"/timelines/remote/{instance}", pq); 36 40 }