Add JSON activities API endpoint (#2783)

* Add JSON events API endpoint

* Add regression test for event particulars defaults

* Move JSON events API to a dedicated ActivitiesController

The events endpoint served both the HTML day timeline and the JSON API
feed, but the two paths shared no data or behavior — the HTML side uses
DayTimelinesScoped while the JSON side built its own query. Splitting
into ActivitiesController gives the API its own home at
GET /:account/activities.json without dragging in the timeline
before_actions.

Also preloads comment creator in Event.preloaded to avoid an N+1 when
rendering comment eventables in the JSON feed.
This commit is contained in:
Rob Zolkos
2026-04-08 08:39:36 -04:00
committed by GitHub
parent 2a4adf3a2b
commit 6a71856b3d
10 changed files with 561 additions and 1 deletions
+1
View File
@@ -17,6 +17,7 @@ a bot to perform various actions for you.
- [Reactions](sections/reactions.md)
- [Tags](sections/tags.md)
- [Users](sections/users.md)
- [Activities](sections/activities.md)
- [Notifications](sections/notifications.md)
- [Rich Text](sections/rich_text.md)
- [Exports](sections/exports.md)