Skip to content

Commit

Permalink
sendVCard displayName as subtype and undefined Conn fix
Browse files Browse the repository at this point in the history
When the message is vcard type, the displayName can be set on the subtype, hinting the name of the contact to add without having to open the vcard to see the contact name.
Also, removed the dependency on Store.Conn.me since its not needed, and it's not always unpacked properly or on time (still tracing this)
  • Loading branch information
choval committed Oct 18, 2018
1 parent 946d072 commit 91a793b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webwhatsapi/js/wapi.js
Expand Up @@ -1218,7 +1218,6 @@ window.WAPI.sendVCard = function(chatId, vcard) {

var extend = {
ack: 0,
from: Store.Conn.me,
id: newId,
local: !0,
self: "out",
Expand All @@ -1237,6 +1236,7 @@ window.WAPI.sendVCard = function(chatId, vcard) {
} else {
Object.assign(extend, {
type: "vcard",
subtype: vcard.displayName,
body: vcard.vcard
});

Expand Down

0 comments on commit 91a793b

Please sign in to comment.