will not show direct rooms if blocked

This commit is contained in:
simplonco
2023-01-16 16:08:56 +01:00
parent 61864af0a3
commit 3cd9a0b52e
5 changed files with 33 additions and 16 deletions

View File

@@ -239,7 +239,7 @@ export async function remove_block_user(username: string): Promise<void>
await fetch_chat_request('unblock', FetchMethod.POST, {username: username} );
}
export async function list_block_user(username: string): Promise<string>
export async function list_block_user(username: string): Promise<string[]>
{
to_print("in list_block_user");

View File

@@ -6,8 +6,11 @@ const address = `http://${process.env.WEBSITE_HOST}:${process.env.WEBSITE_PORT}`
export async function init_socket()
{
to_print("in init_socket");
console.log("here");
const response = await fetch(`${address}/api/v2/user`);
const response_data = await response.json();
to_print("-- response_data:", response_data);
set_user(response_data);
@@ -19,6 +22,7 @@ export async function init_socket()
username: response_data.username,
},
});
console.log("horo");
set_socket(socket);
socket_states(socket);