Programmatically delete post or move it to different space?
EDIT: Figured it out and it was way easier than expected. I already have the feed (post) in my existing code so all it took was these two lines of code to move the post to a different space.
$feed['space_id'] = '76';
$feed->save();
Question: Has anyone figured out the PHP code to either delete a post or move it from one space to a different one? I'm looking in the code but haven't found it yet so I figured I'd ask in case someone else has already done this. For moving, I do see the update function in FeedsController but forming a valid request in PHP would be a nightmare, I think.
Thanks!
What is it you're trying to do? Changing the Space of a post is as simple as changing the space in its database entry.
Ross FCAΒ I've got a space that will primarily only contain posts with Yes/No polls (sort of a request and voting system). I've got code that triggers on votes and immediately ends the poll if all members in the space have voted. This works great but I'd like to be able to move these finished voting posts to an 'archive' space for historical purposes and so the votes already made don't clutter up the main space.
I could do it directly in MySQL but I was hoping to do it programmatically using FC functions/code to minimize potential issues in the future if the Ninjas change the database structure (not likely, but possible).
Thanks.
I know this is an old post, but I was interested in finding a way to move a post from one space to another. Surprised that this isn't something that exists natively. I'm curious, though, if you move the post to a new space, will people get an email notification, or is that simply not done because it's already been posted somewhere else?
BobΒ Do you mean manually moving one post at a time? If so, it exists already. Edit a post and you should see the option to move it to a different space.

Not sure on the email notifications.
Thomas OatesΒ Oh wow, how did I miss that lol. Good to know. I guess I'll have to test it further if it sends an email. Thanks.