From f596c8125a03291c6c14ee7e66ed27c9ee6f2082 Mon Sep 17 00:00:00 2001 From: Mikunj Date: Thu, 29 Nov 2018 15:49:35 +1100 Subject: [PATCH] Only attach profile if name is set. --- libtextsecure/sendmessage.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libtextsecure/sendmessage.js b/libtextsecure/sendmessage.js index 2bf30970d..9eb2ec626 100644 --- a/libtextsecure/sendmessage.js +++ b/libtextsecure/sendmessage.js @@ -133,10 +133,9 @@ Message.prototype = { proto.profileKey = this.profileKey; } - if (this.profile) { + if (this.profile && this.profile.name) { const contact = new textsecure.protobuf.DataMessage.Contact(); - if (this.profile.name) - contact.name = this.profile.name; + contact.name = this.profile.name; proto.profile = contact; }