From 2200a9c1520f986616123427665b3b204f985ccb Mon Sep 17 00:00:00 2001 From: Iiro Laiho Date: Wed, 7 Dec 2022 00:35:15 +0200 Subject: [PATCH] Cleanup (whatsapp) --- bridge/whatsappmulti/helpers.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bridge/whatsappmulti/helpers.go b/bridge/whatsappmulti/helpers.go index 08043d2d0b..c3c9d01816 100644 --- a/bridge/whatsappmulti/helpers.go +++ b/bridge/whatsappmulti/helpers.go @@ -45,7 +45,7 @@ func (b *Bwhatsapp) getSenderName(info types.MessageInfo) string { sender, exists = b.contacts[senderJid] } - if exists && ( sender.FullName != "" ) { + if exists && sender.FullName != "" { return sender.FullName } @@ -53,7 +53,7 @@ func (b *Bwhatsapp) getSenderName(info types.MessageInfo) string { return info.PushName } - if exists && ( sender.FirstName != "" ) { + if exists && sender.FirstName != "" { return sender.FirstName } @@ -72,11 +72,11 @@ func (b *Bwhatsapp) getSenderNotify(senderJid types.JID) string { return "someone" } - if sender.FullName != "" { + if exists && sender.FullName != "" { return sender.FullName } - if sender.PushName != "" { + if exists && sender.PushName != "" { return sender.PushName }