diff options
author | John Hernandez <129467592+H3rnand3zzz@users.noreply.github.com> | 2023-03-31 02:48:20 +0200 |
---|---|---|
committer | John Hernandez <129467592+H3rnand3zzz@users.noreply.github.com> | 2023-03-31 12:30:51 +0200 |
commit | 99c9f150f68ae7087e51f217ebd62010fcf07c16 (patch) | |
tree | f7873374335b37ecb46d6b69cc11f230deed7829 /src/ui | |
parent | 2093fe417f6a1d7f8741613a83ed81e18ae272c9 (diff) | |
download | profani-tty-99c9f150f68ae7087e51f217ebd62010fcf07c16.tar.gz |
Fix PGP
Fix of PGP and potentially other encryption methods by calling correct function that would initiate them in case if someone writes.
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/core.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/ui/core.c b/src/ui/core.c index 5ce42e50..7bcac08b 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -768,20 +768,18 @@ ui_print_system_msg_from_recipient(const char* const barejid, const char* messag return; ProfChatWin* chatwin = wins_get_chat(barejid); - ProfWin* window = (ProfWin*)chatwin; - if (window == NULL) { - window = wins_new_chat(barejid); - if (window) { - chatwin = (ProfChatWin*)window; - int num = wins_get_num(window); + if (chatwin == NULL) { + chatwin = chatwin_new(barejid); + if (chatwin) { + int num = wins_get_num((ProfWin*)chatwin); status_bar_active(num, WIN_CHAT, chatwin->barejid); } else { - window = wins_get_console(); + chatwin = (ProfChatWin*)wins_get_console(); status_bar_active(1, WIN_CONSOLE, "console"); } } - win_println(window, THEME_DEFAULT, "-", "*%s %s", barejid, message); + win_println((ProfWin*)chatwin, THEME_DEFAULT, "-", "*%s %s", barejid, message); } void |