Only attach profile if name is set.

pull/61/head
Mikunj 7 years ago
parent 3bf52c8f82
commit f596c8125a

@ -133,9 +133,8 @@ Message.prototype = {
proto.profileKey = this.profileKey; proto.profileKey = this.profileKey;
} }
if (this.profile) { if (this.profile && this.profile.name) {
const contact = new textsecure.protobuf.DataMessage.Contact(); const contact = new textsecure.protobuf.DataMessage.Contact();
if (this.profile.name)
contact.name = this.profile.name; contact.name = this.profile.name;
proto.profile = contact; proto.profile = contact;
} }

Loading…
Cancel
Save