1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Convert name to barejid on retrieving win in titlebar for otr messages

fixes #289
This commit is contained in:
James Booth 2014-01-21 18:14:20 +00:00
parent 7e9c8c02a3
commit 6468f40dd9

View File

@ -29,6 +29,7 @@
#include "ui/ui.h" #include "ui/ui.h"
#include "ui/windows.h" #include "ui/windows.h"
#include "ui/window.h" #include "ui/window.h"
#include "roster_list.h"
#define CONSOLE_TITLE "Profanity. Type /help for help information." #define CONSOLE_TITLE "Profanity. Type /help for help information."
@ -158,7 +159,8 @@ _title_bar_draw(void)
#ifdef HAVE_LIBOTR #ifdef HAVE_LIBOTR
// show privacy // show privacy
if (current_recipient != NULL) { if (current_recipient != NULL) {
ProfWin *current = wins_get_by_recipient(current_recipient); char *recipient_jid = roster_barejid_from_name(current_recipient);
ProfWin *current = wins_get_by_recipient(recipient_jid);
if (current != NULL) { if (current != NULL) {
if (current->type == WIN_CHAT) { if (current->type == WIN_CHAT) {
if (!current->is_otr) { if (!current->is_otr) {