Assign authorId to posts in the parsing functions #5936
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Assign authorId to posts in the parsing functions
Pull Request Type
Description
Currently we assign the authorId (channel ID) to community posts after we have parsed them, this is because when we originally implemented community post suppport into FreeTube we didn't need the channel ID. As we now need the channel ID everywhere that we use community posts in FreeTube we have code in various places to add the channel IDs to the posts after the fact. As the channel IDs are also available in the API response data, this pull request moves the assigning of the authorId into the parsing functions, which lets us clean up all the other code that was assigning the channel ID after the fact.
Testing
Check that the channel name on community posts is still a link on the subscriptions tab and the channel page with both API backends.
Side note: The live channel tab endpoint is currently broken on Invidious' end, so if you get an error about
Request contains an invalid argument
on the channel page you can ignore it as it is unrelated to this pull request: iv-org/invidious#5021Desktop