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] Add bookmarks timeline

authored by

pancakes and committed by
Laura Hausmann
ffaeebc2 b8d6f6f3

+17 -1
+17 -1
Iceshrimp.Backend/Controllers/Web/TimelineController.cs
··· 125 125 Filter.FilterContext.Public); 126 126 } 127 127 128 + [HttpGet("bookmarks")] 129 + [ProducesResults(HttpStatusCode.OK)] 130 + public async Task<IEnumerable<NoteResponse>> GetBookmarksTimeline(PaginationQuery pq) 131 + { 132 + var user = HttpContext.GetUserOrFail(); 133 + var notes = await db.NoteBookmarks 134 + .Where(p => p.User == user) 135 + .IncludeCommonProperties() 136 + .Select(p => p.Note) 137 + .Paginate(pq, ControllerContext) 138 + .PrecomputeVisibilities(user) 139 + .ToListAsync(); 140 + 141 + return await noteRenderer.RenderManyAsync(notes.EnforceRenoteReplyVisibility(), user); 142 + } 143 + 128 144 [HttpGet("remote/{instance}")] 129 145 [ProducesResults(HttpStatusCode.OK)] 130 146 public async Task<IEnumerable<NoteResponse>> GetRemoteTimeline(string instance, PaginationQuery pq) ··· 145 161 return await noteRenderer.RenderManyAsync(notes.EnforceRenoteReplyVisibility(), user, 146 162 Filter.FilterContext.Public); 147 163 } 148 - } 164 + }