Fix conversation accounts for migrated users#655
Merged
Conversation
Contributor
Test this PR in WordPress PlaygroundYou can test this pull request directly in WordPress Playground: This will install and activate the plugin with the changes from this PR. |
When post_author is 0 (WP users migrated to Friend terms), fall back to the friends_feed_url post meta to resolve the account. This prevents conversations from having empty accounts arrays, which crashes Tusky.
86a7ebc to
0dc0e7f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Summary
post_authorbecame 0 on existing conversation postsaccountsarrays for these conversationsIndexOutOfBoundsExceptionwhen rendering conversationsfriends_feed_urlpost meta to resolve the account whenpost_authoris 0Test plan
/api/v1/conversationsreturns non-emptyaccountsfor all conversationsChangelog
Type
Message
Fix conversation accounts for migrated users by falling back to friends_feed_url meta when post_author is 0.
Test in WordPress Playground