Only attach profile if name is set.

This commit is contained in:
Mikunj 2018-11-29 15:49:35 +11:00
parent 3bf52c8f82
commit f596c8125a

View file

@ -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;
}