Compare commits

...

2 Commits

@ -63,6 +63,7 @@ bool handle_admin_initial_owner_setup( struct http_request* req )
owner->banner = aformat("https://%s/owner/banner.blob", g_server->domain );
owner->avatar.url = aformat("https://%s/owner/avatar.blob", g_server->domain );
owner->avatar.static_url = aformat("https://%s/owner/avatar.blob", g_server->domain );
owner->note = strdup("");
account_save(owner);
// Create home timeline account

@ -236,12 +236,17 @@ static struct account* account_load_from_id( int id, int recurse_limit )
return NULL;
}
// Handle account migration
if( a->replaced_by && a->replaced_by != a->id ) {
int new_id = a->replaced_by;
account_free(a);
return account_load_from_id( new_id, recurse_limit - 1 );
}
// Sanity checks
if( !a->note ) {
a->note = strdup("");
}
if( !a->banner ) {
a->banner = aformat( "https://%s/server/default-banner.blob", g_server->domain );
}

Loading…
Cancel
Save