-
Notifications
You must be signed in to change notification settings - Fork 80
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
Add Undo functionality #1301
base: trunk
Are you sure you want to change the base?
Add Undo functionality #1301
Conversation
Tests fail because the activity saved in Outbox items has |
4a2fd82
to
8ad2832
Compare
@pfefferle Setting the default for Not sure how you feel about defaulting to an empty array for it in |
New approach: Being more prescriptive than checking for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems good to me.
Where, if anywhere, could we also expose this in the UI? Should we add a wp-cli
command?
I like that, yes! |
Fixes #1289
Proposed changes:
get_activity()
andget_author()
methods toOutbox
class, where they feel more appropriate. These methods take an outbox id.undo()
method toOutbox
class, that accepts an outbox item and creates an Undo activity based on it. It accounts forCreate
andAdd
activities requiring their own "undo" type.Base::transform_object_properties()
andBase_Object::to_array()
to not only discardnull
values but also empty values unless they'refalse
.Other information:
Testing instructions:
Base::transform_object_properties()
andBase_Object::to_array()
are probably what has the highest potential for unintended consequences. Anything standing you there?