mirror of
https://github.com/profanity-im/profanity.git
synced 2025-05-18 13:58:57 -04:00
ui_smp_aborted takes ProfChatWin
This commit is contained in:
parent
0b51f4d36f
commit
3cea2bc4f4
@ -217,7 +217,10 @@ otrlib_handle_tlvs(OtrlUserState user_state, OtrlMessageAppOps *ops, ConnContext
|
|||||||
tlv = otrl_tlv_find(tlvs, OTRL_TLV_SMP_ABORT);
|
tlv = otrl_tlv_find(tlvs, OTRL_TLV_SMP_ABORT);
|
||||||
if (tlv) {
|
if (tlv) {
|
||||||
context->smstate->nextExpected = OTRL_SMP_EXPECT1;
|
context->smstate->nextExpected = OTRL_SMP_EXPECT1;
|
||||||
ui_smp_aborted(context->username);
|
ProfChatWin *chatwin = wins_get_chat(context->username);
|
||||||
|
if (chatwin) {
|
||||||
|
ui_smp_aborted(chatwin);
|
||||||
|
}
|
||||||
ui_untrust(context->username);
|
ui_untrust(context->username);
|
||||||
otr_untrust(context->username);
|
otr_untrust(context->username);
|
||||||
}
|
}
|
||||||
|
@ -229,7 +229,9 @@ cb_handle_smp_event(void *opdata, OtrlSMPEvent smp_event,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case OTRL_SMPEVENT_ABORT:
|
case OTRL_SMPEVENT_ABORT:
|
||||||
ui_smp_aborted(context->username);
|
if (chatwin) {
|
||||||
|
ui_smp_aborted(chatwin);
|
||||||
|
}
|
||||||
ui_untrust(context->username);
|
ui_untrust(context->username);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -140,12 +140,11 @@ ui_smp_unsuccessful_receiver(ProfChatWin *chatwin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ui_smp_aborted(const char *const barejid)
|
ui_smp_aborted(ProfChatWin *chatwin)
|
||||||
{
|
{
|
||||||
ProfChatWin *chatwin = wins_get_chat(barejid);
|
assert(chatwin != NULL);
|
||||||
if (chatwin) {
|
|
||||||
win_print((ProfWin*)chatwin, '!', 0, NULL, 0, 0, "", "SMP session aborted.");
|
win_print((ProfWin*)chatwin, '!', 0, NULL, 0, 0, "", "SMP session aborted.");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -72,7 +72,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(ProfChatWin *chatwin);
|
void ui_smp_unsuccessful_receiver(ProfChatWin *chatwin);
|
||||||
void ui_smp_aborted(const char *const barejid);
|
void ui_smp_aborted(ProfChatWin *chatwin);
|
||||||
|
|
||||||
void ui_smp_answer_success(const char *const barejid);
|
void ui_smp_answer_success(const char *const barejid);
|
||||||
void ui_smp_answer_failure(const char *const barejid);
|
void ui_smp_answer_failure(const char *const barejid);
|
||||||
|
@ -76,7 +76,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(ProfChatWin *chatwin) {}
|
void ui_smp_unsuccessful_receiver(ProfChatWin *chatwin) {}
|
||||||
void ui_smp_aborted(const char * const barejid) {}
|
void ui_smp_aborted(ProfChatWin *chatwin) {}
|
||||||
|
|
||||||
void ui_smp_answer_success(const char * const barejid) {}
|
void ui_smp_answer_success(const char * const barejid) {}
|
||||||
void ui_smp_answer_failure(const char * const barejid) {}
|
void ui_smp_answer_failure(const char * const barejid) {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user