will not show direct rooms if blocked
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user