This commit is contained in:
Brice-W 2021-08-02 14:15:11 +10:00
parent d8fa73d393
commit fbe9f19c81
2 changed files with 4 additions and 4 deletions

View file

@ -34,8 +34,8 @@ export function banUser(
: window.i18n('banUserConfirm');
const confirmationModalProps = {
title: title,
message: message,
title,
message,
onClickClose,
onClickOk: async () => {
const conversation = getConversationController().get(conversationId);

View file

@ -268,14 +268,14 @@ export const banUser = async (
deleteAllMessages: boolean
): Promise<boolean> => {
const queryParams = { public_key: userToBan.key };
const endPoint = deleteAllMessages ? 'ban_and_delete_all' : 'block_list';
const endpoint = deleteAllMessages ? 'ban_and_delete_all' : 'block_list';
const request: OpenGroupV2Request = {
method: 'POST',
room: roomInfos.roomId,
server: roomInfos.serverUrl,
isAuthRequired: true,
queryParams,
endpoint: endPoint,
endpoint,
};
const banResult = await exports.sendApiV2Request(request);
const isOk = parseStatusCodeFromOnionRequest(banResult) === 200;