ui_smp_successful takes ProfChatWin
This commit is contained in:
@@ -177,11 +177,13 @@ otrlib_handle_tlvs(OtrlUserState user_state, OtrlMessageAppOps *ops, ConnContext
|
||||
} else {
|
||||
context->smstate->nextExpected = OTRL_SMP_EXPECT1;
|
||||
if (context->smstate->received_question == 0) {
|
||||
ProfChatWin *chatwin = wins_get_chat(context->username);
|
||||
if (context->active_fingerprint->trust && (context->active_fingerprint->trust[0] != '\0')) {
|
||||
ui_smp_successful(context->username);
|
||||
if (chatwin) {
|
||||
ui_smp_successful(chatwin);
|
||||
}
|
||||
ui_trust(context->username);
|
||||
} else {
|
||||
ProfChatWin *chatwin = wins_get_chat(context->username);
|
||||
if (chatwin) {
|
||||
ui_smp_unsuccessful_sender(chatwin);
|
||||
}
|
||||
@@ -202,11 +204,13 @@ otrlib_handle_tlvs(OtrlUserState user_state, OtrlMessageAppOps *ops, ConnContext
|
||||
otrl_message_abort_smp(user_state, ops, NULL, context);
|
||||
} else {
|
||||
context->smstate->nextExpected = OTRL_SMP_EXPECT1;
|
||||
ProfChatWin *chatwin = wins_get_chat(context->username);
|
||||
if (context->active_fingerprint->trust && (context->active_fingerprint->trust[0] != '\0')) {
|
||||
ui_smp_successful(context->username);
|
||||
if (chatwin) {
|
||||
ui_smp_successful(chatwin);
|
||||
}
|
||||
ui_trust(context->username);
|
||||
} else {
|
||||
ProfChatWin *chatwin = wins_get_chat(context->username);
|
||||
if (chatwin) {
|
||||
ui_smp_unsuccessful_receiver(chatwin);
|
||||
}
|
||||
|
||||
@@ -196,7 +196,9 @@ cb_handle_smp_event(void *opdata, OtrlSMPEvent smp_event,
|
||||
|
||||
case OTRL_SMPEVENT_SUCCESS:
|
||||
if (context->smstate->received_question == 0) {
|
||||
ui_smp_successful(context->username);
|
||||
if (chatwin) {
|
||||
ui_smp_successful(chatwin);
|
||||
}
|
||||
ui_trust(context->username);
|
||||
} else {
|
||||
ui_smp_answer_success(context->username);
|
||||
|
||||
Reference in New Issue
Block a user