mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-30 18:36:21 +00:00
Combined chatwin OTR SMP functions
This commit is contained in:
@@ -577,13 +577,13 @@ otr_smp_secret(const char *const recipient, const char *secret)
|
||||
if (g_hash_table_contains(smp_initiators, recipient)) {
|
||||
otrl_message_respond_smp(user_state, &ops, NULL, context, (const unsigned char*)secret, strlen(secret));
|
||||
if (chatwin) {
|
||||
chatwin_otr_smp_authenticating(chatwin);
|
||||
chatwin_otr_smp_event(chatwin, PROF_OTR_SMP_AUTH, NULL);
|
||||
}
|
||||
g_hash_table_remove(smp_initiators, context->username);
|
||||
} else {
|
||||
otrl_message_initiate_smp(user_state, &ops, NULL, context, (const unsigned char*)secret, strlen(secret));
|
||||
if (chatwin) {
|
||||
chatwin_otr_smp_authenticaton_wait(chatwin);
|
||||
chatwin_otr_smp_event(chatwin, PROF_OTR_SMP_AUTH_WAIT, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -604,7 +604,7 @@ otr_smp_question(const char *const recipient, const char *question, const char *
|
||||
otrl_message_initiate_smp_q(user_state, &ops, NULL, context, question, (const unsigned char*)answer, strlen(answer));
|
||||
ProfChatWin *chatwin = wins_get_chat(recipient);
|
||||
if (chatwin) {
|
||||
chatwin_otr_smp_authenticaton_wait(chatwin);
|
||||
chatwin_otr_smp_event(chatwin, PROF_OTR_SMP_AUTH_WAIT, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user