Fetch All Replies
Fetch All Replies | |
---|---|
Description | Fetch all replies for a given post, even if we don't follow everyone! |
Part Of | Mastodon/Hacking |
Contributors | Jonny Saunders |
Has Git Repository | https://github.com/NeuromatchAcademy/mastodon |
Completion Status | Draft |
Active Status | Active |
Approval Status | Unapproved"Unapproved" is not in the list (Draft, Provisional, Approved, Proposed, Blocked) of allowed values for the "Approval Status" property. |
Approaches
Button
Adds a button to the bottom of an expanded status to fetch all replies from the OP server (or as many as they will give us).
- Example: https://neuromatch.social/@jonny/109582537808504261
- Context: https://neuromatch.social/tags/FetchAllReplies
- Pull Request: https://github.com/NeuromatchAcademy/mastodon/pull/8
The feature:
- Tries to figure out the API URL for the OP server (currently just using the masto pattern, consider that a TODO)
- Fetches the replies from the /statuses/{:id}/context endpoint
- Uses the search API on the host instance in order to fetch the necessary status and account information to display the status.
It also:
- Displays a dialogue box showing how many statuses it is grabbing
Still to do:
- Write tests (dont know hwo to do that in ruby)
- Catch errors better
- Insert into thread in correct order (refreshing fixes)
FetchReplyWorker
See:
- Issue: https://github.com/NeuromatchAcademy/mastodon/issues/43
- PR: https://github.com/NeuromatchAcademy/mastodon/pull/44
(Jonny copy over description once we merge)