feat: implement end-to-end encryption for chat messages and files, including key management and decryption functionality; enhance chat components to support encrypted content display
This commit is contained in:
@@ -101,15 +101,22 @@
|
||||
carregando = true;
|
||||
|
||||
try {
|
||||
if (!authStore.token) {
|
||||
throw new Error('Token não encontrado');
|
||||
}
|
||||
|
||||
const resultado = await convex.mutation(api.autenticacao.alterarSenha, {
|
||||
token: authStore.token,
|
||||
// Construir objeto de argumentos, incluindo token apenas se existir
|
||||
const args: {
|
||||
senhaAtual: string;
|
||||
novaSenha: string;
|
||||
token?: string;
|
||||
} = {
|
||||
senhaAtual: senhaAtual,
|
||||
novaSenha: novaSenha
|
||||
});
|
||||
};
|
||||
|
||||
// Adicionar token apenas se existir
|
||||
if (authStore.token) {
|
||||
args.token = authStore.token;
|
||||
}
|
||||
|
||||
const resultado = await convex.mutation(api.autenticacao.alterarSenha, args);
|
||||
|
||||
if (resultado.sucesso) {
|
||||
notice = {
|
||||
|
||||
Reference in New Issue
Block a user