So some people want to change hubs. Maybe they're a dirty ~~red~~ ~~blue~~ infinity user and have regretted their decision and want to join Kaffie's Hub. Well here's how to cleanly migrate hubs.
First things first is to seed the new hub you want to switch to. You're likely already seeding Red and Blue, but you'll need to seed the Kaffie hub or the infinity hub, if you want to switch to those.
Don't bother going to the
create profile page. That's for suckers. It's nice to check which hubs you're seeding, but the
create profile button just messes things up. Instead, go to your home hub (you can figure out what this is by hovering over your name and looking at the URL) and go into the
/data/users/[your id]/ folder. You'll want to copy over this whole folder into the new hub's equivalent.
In the destination hub, open up
content.json in a text editor (like sublime, so formatting doesn't get messed up). All you want to do is edit
address to point to the new hub, instead of your old one.
Next, open up
data.json in the destination hub. You'll see all your original hub data. Here's what we're going to do. Delete all of the entries under
comments. These are comments relating to the hub they're in, so you don't need them migrated. You should still keep the array though, since that's where all your new hub comments will go.
hub to the new hub you're migrating to. Just like you did in the
content.json. This is a reference to say what your 'home hub' is. We'll eventually edit this in EVERY hub you're seeding or posted in, but one step at a time.
next_comment_id to 1. Since we deleted the comments, we need to reset the counter.
Here's where you get a choice. There's two options for your posts. Either you can migrate the data, which switches the name link on those posts (and hosts it in the new hub) but also unlink everyone's comments, or you can leave the posts in the old hub, and start fresh. If you start fresh, your old posts will still appear, but they'll link back to your old hub profile. So keep that in mind. I personally started fresh.
To start fresh, do the same thing to your posts as you did your comments. Delete all the entries ~~and change the
next_post_id to 1.~~ Changing the next_post_id will cause a duplicate like bug. Leave it at wherever it is to avoid the bug.
Lastly, delete everything under
post_like. Keep the array though.
That should set up your new hub account. Now we need to repoint your data on the other hubs. For each hub you've posted in, go into that hub's folder and find your user folder, like we did before.
On each one, open the
data.json and simply edit the
hub variable to point to your home hub. This is probably optional (as it repoints the comment links), but I went ahead and did it to reduce the amount of problems.
On your original hub, a couple more things need to be tweaked. Delete everything under 'follows'. Remove the variable entirely. Delete
next_follow_id as well. Change
hub to your new hub, as usual. And if you opted to migrate your posts, delete the entire
posts section along with the
next_post_id variable. If not, leave it. I didn't migrate, so I left the posts there.
Change the intro to something to notify people to switch the profile they follow. This is technically optional, and you can just delete it if you feel like it. Delete the
avatar if you migrated posts (it's unneeded), but if you kept your posts there, then you'll want to keep it, as otherwise your old posts won't have an avatar (perhaps this is preferred?)
Finally, we save up and go to sign/publish our changes. Visit each hub site (the actual site down at the bottom of zerohello, not zerome). Then drag the sidebar open and select 'i own this site'. Put your user
content.json in the bottom box (should look something like:
data/users/[yourid]/content.json) and hit sign. It'll prompt for a privatekey. Use your ZeroID private key (found at the top of your zeronet's
user.json file) and then click publish. Do this for every hub you've edited.
So now all of the changes are made and published. Everyone else should see everything just fine. But you might still be stuck logged into your old hub. So delete every hub but your destination hub. Then go into zerome and ensure you're logged in properly. Finally, redownload each hub and everything should be good to go!
Update: You may also have to edit and sign the content.json located in the
1UDbADib99KE9d3qZ87NqJF2QLTHmMkoV site in order to change your hub in the 'all users' listing.