Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -723,10 +723,12 @@ class Client extends EventEmitter {
/** @type {GroupNotification} object does not provide enough information about this event, so a @type {Message} object is used. */
const message = new Message(this, msg);

const newId = isParticipant ? msg.recipients[0] : msg.to;
const newId = isParticipant
? msg.recipients[0]
: msg._data.templateParams[1];
const oldId = isParticipant
? msg.author
: msg.templateParams.find((id) => id !== newId);
: msg._data.templateParams[0];

/**
* Emitted when a contact or a group participant changes their phone number.
Expand Down
Loading