Commit Graph

11 Commits (fea903f574cd59e6938c775427727337d7f929c3)

Author SHA1 Message Date
ThibG 9d3c6f1849 Improved remote thread fetching ()
* Fetch up to 5 replies when discovering a new remote status

This is used for resolving threads downwards. The originating
server must add a “replies” attributes with such replies for it to
be useful.

* Add some tests for ActivityPub::FetchRepliesWorker

* Add specs for ActivityPub::FetchRepliesService

* Serialize up to 5 public self-replies for ActivityPub notes

* Add specs for ActivityPub::NoteSerializer

* Move exponential backoff logic to a worker concern

* Fetch first page of paginated collections when fetching thread replies

* Add specs for paginated collections in replies

* Move Note replies serialization to a first CollectionPage

The collection isn't actually paginable yet as it has no id nor
a `next` field. This may come in another PR.

* Use pluck(:uri) instead of map(&:uri) to improve performances

* Fix fetching replies when they are in a CollectionPage
Eugen Rochko 0eaf6d7693
Sort self-replies to the top of descendants ()
Fix 
Eugen Rochko 87a43274f1
Revert "Sort self-replies to the top of the thread ()" ()
This reverts commit 074960bb0f.

Fix 
Eugen Rochko 074960bb0f
Sort self-replies to the top of the thread ()
Fix 
nightpool 5fb013878f Fix context performance by partially reverting ()
* Fix context performance by partially reverting 

* Fix code style issue

* fix off-by-1 error in thread limits

* code style fix
Eugen Rochko f31e58af9e
Fix nil error in StatusFilter ()
Fix 
Eugen Rochko a5293fdf61
Fix n+1 queries in StatusThreadingConcern ()
Akihiko Odaki 1258efa882 Paginate descendant statuses in public page ()
Akihiko Odaki 519119f657 Paginate ancestor statuses in public page ()
This also limits the statuses returned by API, but pagination is not
implemented in Web API yet. I still expect it brings user experience
better than making a user wait to fetch all ancestor statuses and flooding
the column with them.
Akihiko Odaki 498327b2e3 Exclude status itself from context query ()
ancestor_statuses and descendant_statuses used to include the root status
itself, but the behavior is confusing because the root status is not
an ancestor nor descendant.
Matt Jankowski 6201f96b8a Introduce StatusThreadingConcern ()
* Add a StatusFilter class to identify visibility of statuses by accounts

* Extract StatusThreadingConcern from Status

* Clarify purpose of checking for nil account