diff options
author | James Booth <boothj5@gmail.com> | 2015-10-26 23:29:01 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-10-26 23:29:01 +0000 |
commit | 3ce55de1e172c37ba32cdb7b2200b8758e2c8459 (patch) | |
tree | ec1197e162a016e44e39432581d0d82eef01eaee /src/ui | |
parent | 55e857d6a8ccd3c5f993ac867c864e7b22be1645 (diff) | |
download | profani-tty-3ce55de1e172c37ba32cdb7b2200b8758e2c8459.tar.gz |
ui_smp_recipient_initiated_q takes ProfChatWin
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/chatwin.c | 13 | ||||
-rw-r--r-- | src/ui/ui.h | 2 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/ui/chatwin.c b/src/ui/chatwin.c index 7b1c3365..301fc45e 100644 --- a/src/ui/chatwin.c +++ b/src/ui/chatwin.c @@ -110,14 +110,13 @@ ui_smp_recipient_initiated(ProfChatWin *chatwin) } void -ui_smp_recipient_initiated_q(const char *const barejid, const char *question) +ui_smp_recipient_initiated_q(ProfChatWin *chatwin, const char *question) { - ProfChatWin *chatwin = wins_get_chat(barejid); - if (chatwin) { - win_vprint((ProfWin*)chatwin, '!', 0, NULL, 0, 0, "", "%s wants to authenticate your identity with the following question:", barejid); - win_vprint((ProfWin*)chatwin, '!', 0, NULL, 0, 0, "", " %s", question); - win_print((ProfWin*)chatwin, '!', 0, NULL, 0, 0, "", "use '/otr answer <answer>'."); - } + assert(chatwin != NULL); + + win_vprint((ProfWin*)chatwin, '!', 0, NULL, 0, 0, "", "%s wants to authenticate your identity with the following question:", chatwin->barejid); + win_vprint((ProfWin*)chatwin, '!', 0, NULL, 0, 0, "", " %s", question); + win_print((ProfWin*)chatwin, '!', 0, NULL, 0, 0, "", "use '/otr answer <answer>'."); } void diff --git a/src/ui/ui.h b/src/ui/ui.h index 139a291f..41cc35fe 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -67,7 +67,7 @@ void ui_gone_insecure(ProfChatWin *chatwin); void ui_trust(const char *const barejid); void ui_untrust(const char *const barejid); void ui_smp_recipient_initiated(ProfChatWin *chatwin); -void ui_smp_recipient_initiated_q(const char *const barejid, const char *question); +void ui_smp_recipient_initiated_q(ProfChatWin *chatwin, const char *question); void ui_smp_successful(const char *const barejid); void ui_smp_unsuccessful_sender(const char *const barejid); |