From 46485a08c35dd6731eb3bcd5c93f20000c9512f5 Mon Sep 17 00:00:00 2001 From: mjentsch Date: Tue, 29 Dec 2015 15:28:57 +0100 Subject: [PATCH] Remove redundant code Existance of print_name is already assured in the check above. --- telegram-purple.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/telegram-purple.c b/telegram-purple.c index ae1abd8..3aaeeb7 100644 --- a/telegram-purple.c +++ b/telegram-purple.c @@ -115,9 +115,8 @@ static void update_user_handler (struct tgl_state *TLS, struct tgl_user *user, u // the id isn't known to the lookup yet since the user is not in the buddy list. Add the id to the // lookup to allow sending messages to this user based on the purple name. - if (user->print_name) { - tgp_blist_lookup_add (TLS, user->id, user->print_name); - } + tgp_blist_lookup_add (TLS, user->id, user->print_name); + } else { // Keep the users name up-to-date. Changing the actual user name would imply making the history // inacessible, therefore name changes should only affect the alias.