As noted in the first linked issue, posts can have not only the single blog that "owns" them, but can also have a secondary blog associated with them: either the submitting blog if the post is a submission, the author blog if the post is on a group blog with the "show author portraits" setting enabled, or the author blog if the post is part of Tumblr Communities.
Notably, in the third case, the Tumblr UI reverses how these two fields affect how a post is rendered (the community owns the post, but the post looks like the "authorBlog" owns it).
Themed Posts' rendering should be consistent with how a post looks, so this overrides the field it queries to determine post color only in the case of Communities posts.
(I had changes to other scripts in this PR but none of them wound up being entirely correct.)
Testing steps
Confirm that Themed Posts functions normally outside of Communities.
Confirm that Themed Posts colors posts in Communities with the author's blog color.
Description
Related: #1441
As noted in the first linked issue, posts can have not only the single blog that "owns" them, but can also have a secondary blog associated with them: either the submitting blog if the post is a submission, the author blog if the post is on a group blog with the "show author portraits" setting enabled, or the author blog if the post is part of Tumblr Communities.
Notably, in the third case, the Tumblr UI reverses how these two fields affect how a post is rendered (the community owns the post, but the post looks like the "authorBlog" owns it).
Themed Posts' rendering should be consistent with how a post looks, so this overrides the field it queries to determine post color only in the case of Communities posts.
(I had changes to other scripts in this PR but none of them wound up being entirely correct.)
Testing steps