👔 Increase the chance of other type of activities show up

🗑️ Remove debug include in timeline
This commit is contained in:
2025-12-06 21:12:08 +08:00
parent fe3a057185
commit e477429a35
2 changed files with 12 additions and 29 deletions

View File

@@ -25,8 +25,7 @@ public class ActivityController(TimelineService acts) : ControllerBase
public async Task<ActionResult<List<SnTimelineEvent>>> ListEvents(
[FromQuery] string? cursor,
[FromQuery] string? filter,
[FromQuery] int take = 20,
[FromQuery] string? debugInclude = null
[FromQuery] int take = 20
)
{
Instant? cursorTimestamp = null;
@@ -42,13 +41,9 @@ public class ActivityController(TimelineService acts) : ControllerBase
}
}
var debugIncludeSet = debugInclude?.Split(',').ToHashSet() ?? new HashSet<string>();
HttpContext.Items.TryGetValue("CurrentUser", out var currentUserValue);
return currentUserValue is not Account currentUser
? Ok(await acts.ListEventsForAnyone(take, cursorTimestamp, debugIncludeSet))
: Ok(
await acts.ListEvents(take, cursorTimestamp, currentUser, filter, debugIncludeSet)
);
? Ok(await acts.ListEventsForAnyone(take, cursorTimestamp))
: Ok(await acts.ListEvents(take, cursorTimestamp, currentUser, filter));
}
}