Fix a couple bugs

master
teknomunk 1 year ago
parent c90d6c71d8
commit 675af63593

@ -41,6 +41,11 @@ static bool handle_command_follow( struct cli_request* req )
struct account* owner = account_from_id( owner_account_id );
struct account* to_follow = account_from_webfinger( req->argv[0] );
if( !to_follow ) {
printf( "Could not find account %s\n", req->argv[0] );
return true;
}
account_follow( owner, to_follow );
account_free(to_follow);

@ -187,6 +187,7 @@ struct account* account_from_webfinger( const char* handle )
int id;
if( !hash_index_get( "data/accounts/webfinger", handle, &id ) ) {
printf( "! No account id for %s\n", handle );
printf( "! TODO: implement webfinger lookup\n" );
return NULL;
}

@ -4,7 +4,7 @@
"avatar_static":"%s{safe(a->avatar.static_url,"")}",
"bot":%s{ b(a->bot) },
"created_at":"2022-03-18T19:33:06.000Z",
"display_name":"%s{ safe( a->display_name, a->handle )}",
"display_name":%(json_write_string( f, safe( a->display_name, a->handle ) );),
"emojis":[],
"fields":[],
"followers_count":%d{ a->followers_count },

Loading…
Cancel
Save