1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Handle chat states for users not in roster

issue #397
This commit is contained in:
James Booth 2014-08-19 21:22:43 +01:00
parent 78b870b5ec
commit 5b40696ea0
3 changed files with 15 additions and 7 deletions

View File

@ -1,3 +1,3 @@
#!/bin/sh
./configure CFLAGS='-g -O0' CXXFLAGS='-g -O0'
./configure CFLAGS='-g3 -O0' CXXFLAGS='-g3 -O0'

View File

@ -135,10 +135,14 @@ static void
_cons_show_typing(const char * const barejid)
{
ProfWin *console = wins_get_console();
PContact contact = roster_get_contact(barejid);
const char * display_usr = NULL;
if (p_contact_name(contact) != NULL) {
display_usr = p_contact_name(contact);
PContact contact = roster_get_contact(barejid);
if (contact != NULL) {
if (p_contact_name(contact) != NULL) {
display_usr = p_contact_name(contact);
} else {
display_usr = barejid;
}
} else {
display_usr = barejid;
}

View File

@ -1258,10 +1258,14 @@ _ui_recipient_gone(const char * const barejid)
if (barejid == NULL)
return;
PContact contact = roster_get_contact(barejid);
const char * display_usr = NULL;
if (p_contact_name(contact) != NULL) {
display_usr = p_contact_name(contact);
PContact contact = roster_get_contact(barejid);
if (contact != NULL) {
if (p_contact_name(contact) != NULL) {
display_usr = p_contact_name(contact);
} else {
display_usr = barejid;
}
} else {
display_usr = barejid;
}