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

Check roster contact before displayng typing notification

fixes #896
This commit is contained in:
James Booth 2017-01-23 20:56:05 +00:00
parent 83385cdbc0
commit c073418306

View File

@ -298,8 +298,12 @@ ui_contact_typing(const char *const barejid, const char *const resource)
if ( !is_current || (is_current && prefs_get_boolean(PREF_NOTIFY_TYPING_CURRENT)) ) {
PContact contact = roster_get_contact(barejid);
char const *display_usr = NULL;
if (p_contact_name(contact)) {
display_usr = p_contact_name(contact);
if (contact) {
if (p_contact_name(contact)) {
display_usr = p_contact_name(contact);
} else {
display_usr = barejid;
}
} else {
display_usr = barejid;
}