Skip to content

Commit

Permalink
fix: api test
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Jun 26, 2024
1 parent 013f976 commit c92583f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/meteor/app/livechat/server/lib/LivechatTyped.ts
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,8 @@ class LivechatClass {

const livechatVisitor = await LivechatVisitors.getVisitorByToken(token, { projection: { _id: 1 } });

visitorDataToUpdate.token = livechatVisitor?.token || token;

let existingUser = null;

if (livechatVisitor) {
Expand Down Expand Up @@ -720,8 +722,6 @@ class LivechatClass {
}
}

visitorDataToUpdate.token = livechatVisitor?.token || token;

Livechat.logger.debug(visitorDataToUpdate);

const upsertedLivechatVisitor = await LivechatVisitors.updateOneByIdOrToken(visitorDataToUpdate, {
Expand Down

0 comments on commit c92583f

Please sign in to comment.