Added SMP secret authentication success message

This commit is contained in:
James Booth
2014-04-27 01:17:38 +01:00
parent c39c093fa5
commit 2bc19f4669
5 changed files with 39 additions and 1 deletions

View File

@@ -407,9 +407,13 @@ _otr_smp_secret(const char * const recipient, const char *secret)
// if recipient initiated SMP, send response, else initialise
if (g_hash_table_contains(smp_initiators, recipient)) {
otrl_message_respond_smp(user_state, &ops, NULL, context, (const unsigned char*)secret, strlen(secret));
ui_current_print_formatted_line('!', 0, "Authenticating %s...", recipient);
ui_current_page_off();
g_hash_table_remove(smp_initiators, context->username);
} else {
otrl_message_initiate_smp(user_state, &ops, NULL, context, (const unsigned char*)secret, strlen(secret));
ui_current_print_formatted_line('!', 0, "Awaiting authentication from %s...", recipient);
ui_current_page_off();
}
}