Skip to content

Commit

Permalink
fix: dont update the unknown status (#33886)
Browse files Browse the repository at this point in the history
  • Loading branch information
tapiarafael authored Nov 5, 2024
1 parent 0c281a5 commit 33f955c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
18 changes: 6 additions & 12 deletions apps/meteor/ee/server/patches/verifyContactChannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,12 @@ export const runVerifyContactChannel = async (
): Promise<ILivechatContact | null> => {
const { contactId, field, value, visitorId, roomId } = params;

await LivechatContacts.updateContactChannel(
visitorId,
{
verified: true,
verifiedAt: new Date(),
field,
value: value.toLowerCase(),
},
{
unknown: false,
},
);
await LivechatContacts.updateContactChannel(visitorId, {
verified: true,
verifiedAt: new Date(),
field,
value: value.toLowerCase(),
});

await LivechatRooms.update({ _id: roomId }, { $set: { verified: true } });

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ describe('verifyContactChannel', () => {
field: 'field',
value: 'value',
}),
sinon.match({
unknown: false,
}),
),
).to.be.true;
expect(modelsMock.LivechatRooms.update.calledOnceWith({ _id: 'roomId' }, { $set: { verified: true } })).to.be.true;
Expand All @@ -85,9 +82,6 @@ describe('verifyContactChannel', () => {
field: 'field',
value: 'value',
}),
sinon.match({
unknown: false,
}),
),
).to.be.true;
expect(modelsMock.LivechatRooms.update.calledOnceWith({ _id: 'roomId' }, { $set: { verified: true } })).to.be.true;
Expand Down

0 comments on commit 33f955c

Please sign in to comment.