Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profiles: Update followers when profile fields change #542

Merged
merged 9 commits into from
Dec 22, 2023

Conversation

mattwiebe
Copy link
Contributor

Currently we are at the mercy of remote servers refreshing profile data on their schedule. This PR will instead send an Update Activity to all Follower inboxes whenever an update to a relevant option or user meta is updated.

Proposed changes:

  • Schedule an update when relevant fields are changed

Other information:

  • Have you written new tests for your changes, if applicable?

Testing instructions:

This is completely untested so far.

Copy link
Collaborator

@mediaformat mediaformat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we include user Profile Banner code within this plugin?

// profile updates for user options
if ( ! is_user_type_disabled( 'user' ) ) {
\add_action( 'updated_user_meta', array( self::class, 'user_update' ), 10, 3 );
// @todo figure out a feasible way of updating the header image since it's not unique to any user.
Copy link
Collaborator

@mediaformat mediaformat Nov 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattwiebe @pfefferle I have a Profile Banner code stub, which could live inside this plugin, but also makes sense as an independent block for Block Theme use. Any thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mediaformat sounds interesting! Do you have a public repo with the code?

pfefferle
pfefferle previously approved these changes Nov 9, 2023
Copy link
Member

@pfefferle pfefferle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mattwiebe
Copy link
Contributor Author

When I tested this on dotcom it did not necessarily seem like it worked, but that may have been a result of our other troubles there. I will try again now that we fixed our problems with the application user there before merging this.

@github-actions github-actions bot added the Docs label Dec 22, 2023
@pfefferle pfefferle merged commit 3cda64a into master Dec 22, 2023
19 checks passed
@pfefferle pfefferle deleted the add/profile-update-pings branch December 22, 2023 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants