mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
ui_smp_unsuccessful_receiver takes ProfChatWin
This commit is contained in:
parent
d11f8d5ffc
commit
0b51f4d36f
@ -206,7 +206,10 @@ otrlib_handle_tlvs(OtrlUserState user_state, OtrlMessageAppOps *ops, ConnContext
|
|||||||
ui_smp_successful(context->username);
|
ui_smp_successful(context->username);
|
||||||
ui_trust(context->username);
|
ui_trust(context->username);
|
||||||
} else {
|
} else {
|
||||||
ui_smp_unsuccessful_receiver(context->username);
|
ProfChatWin *chatwin = wins_get_chat(context->username);
|
||||||
|
if (chatwin) {
|
||||||
|
ui_smp_unsuccessful_receiver(chatwin);
|
||||||
|
}
|
||||||
ui_untrust(context->username);
|
ui_untrust(context->username);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -210,7 +210,9 @@ cb_handle_smp_event(void *opdata, OtrlSMPEvent smp_event,
|
|||||||
ui_smp_unsuccessful_sender(chatwin);
|
ui_smp_unsuccessful_sender(chatwin);
|
||||||
}
|
}
|
||||||
} else if (nextMsg == OTRL_SMP_EXPECT4) {
|
} else if (nextMsg == OTRL_SMP_EXPECT4) {
|
||||||
ui_smp_unsuccessful_receiver(context->username);
|
if (chatwin) {
|
||||||
|
ui_smp_unsuccessful_receiver(chatwin);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ui_untrust(context->username);
|
ui_untrust(context->username);
|
||||||
} else {
|
} else {
|
||||||
|
@ -131,12 +131,12 @@ ui_smp_unsuccessful_sender(ProfChatWin *chatwin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ui_smp_unsuccessful_receiver(const char *const barejid)
|
ui_smp_unsuccessful_receiver(ProfChatWin *chatwin)
|
||||||
{
|
{
|
||||||
ProfChatWin *chatwin = wins_get_chat(barejid);
|
assert(chatwin != NULL);
|
||||||
if (chatwin) {
|
|
||||||
win_vprint((ProfWin*)chatwin, '!', 0, NULL, 0, 0, "", "Authentication failed, the secret entered by %s does not match yours.", barejid);
|
win_vprint((ProfWin*)chatwin, '!', 0, NULL, 0, 0, "",
|
||||||
}
|
"Authentication failed, the secret entered by %s does not match yours.", chatwin->barejid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -71,7 +71,7 @@ void ui_smp_recipient_initiated_q(ProfChatWin *chatwin, const char *question);
|
|||||||
|
|
||||||
void ui_smp_successful(const char *const barejid);
|
void ui_smp_successful(const char *const barejid);
|
||||||
void ui_smp_unsuccessful_sender(ProfChatWin *chatwin);
|
void ui_smp_unsuccessful_sender(ProfChatWin *chatwin);
|
||||||
void ui_smp_unsuccessful_receiver(const char *const barejid);
|
void ui_smp_unsuccessful_receiver(ProfChatWin *chatwin);
|
||||||
void ui_smp_aborted(const char *const barejid);
|
void ui_smp_aborted(const char *const barejid);
|
||||||
|
|
||||||
void ui_smp_answer_success(const char *const barejid);
|
void ui_smp_answer_success(const char *const barejid);
|
||||||
|
@ -75,7 +75,7 @@ void ui_smp_recipient_initiated_q(ProfChatWin *chatwin, const char *question) {}
|
|||||||
|
|
||||||
void ui_smp_successful(const char * const barejid) {}
|
void ui_smp_successful(const char * const barejid) {}
|
||||||
void ui_smp_unsuccessful_sender(ProfChatWin *chatwin) {}
|
void ui_smp_unsuccessful_sender(ProfChatWin *chatwin) {}
|
||||||
void ui_smp_unsuccessful_receiver(const char * const barejid) {}
|
void ui_smp_unsuccessful_receiver(ProfChatWin *chatwin) {}
|
||||||
void ui_smp_aborted(const char * const barejid) {}
|
void ui_smp_aborted(const char * const barejid) {}
|
||||||
|
|
||||||
void ui_smp_answer_success(const char * const barejid) {}
|
void ui_smp_answer_success(const char * const barejid) {}
|
||||||
|
Loading…
Reference in New Issue
Block a user