diff options
author | James Booth <boothj5@gmail.com> | 2015-10-26 23:36:11 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-10-26 23:36:11 +0000 |
commit | d11f8d5ffc19ebaa2f7c1e3e44e18a92162cc0de (patch) | |
tree | fa02b8accadf0636791916d51759a5b1eabc58b8 /src/ui/chatwin.c | |
parent | 3ce55de1e172c37ba32cdb7b2200b8758e2c8459 (diff) | |
download | profani-tty-d11f8d5ffc19ebaa2f7c1e3e44e18a92162cc0de.tar.gz |
ui_smp_unsuccessful_sender takes ProfChatWin
Diffstat (limited to 'src/ui/chatwin.c')
-rw-r--r-- | src/ui/chatwin.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/ui/chatwin.c b/src/ui/chatwin.c index 301fc45e..e782c0bc 100644 --- a/src/ui/chatwin.c +++ b/src/ui/chatwin.c @@ -106,7 +106,8 @@ ui_smp_recipient_initiated(ProfChatWin *chatwin) { assert(chatwin != NULL); - win_vprint((ProfWin*)chatwin, '!', 0, NULL, 0, 0, "", "%s wants to authenticate your identity, use '/otr secret <secret>'.", chatwin->barejid); + win_vprint((ProfWin*)chatwin, '!', 0, NULL, 0, 0, "", + "%s wants to authenticate your identity, use '/otr secret <secret>'.", chatwin->barejid); } void @@ -114,18 +115,19 @@ ui_smp_recipient_initiated_q(ProfChatWin *chatwin, const char *question) { 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 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 -ui_smp_unsuccessful_sender(const char *const barejid) +ui_smp_unsuccessful_sender(ProfChatWin *chatwin) { - ProfChatWin *chatwin = wins_get_chat(barejid); - if (chatwin) { - win_vprint((ProfWin*)chatwin, '!', 0, NULL, 0, 0, "", "Authentication failed, the secret you entered does not match the secret entered by %s.", barejid); - } + assert(chatwin != NULL); + + win_vprint((ProfWin*)chatwin, '!', 0, NULL, 0, 0, "", + "Authentication failed, the secret you entered does not match the secret entered by %s.", chatwin->barejid); } void |