Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions app/apps/server/bridges/livechat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export class AppLivechatBridge extends LivechatBridge {
email: '',
connectionData: undefined,
phone: {},
id: visitor.id,
};

if (visitor.visitorEmails && visitor.visitorEmails.length) {
Expand Down
4 changes: 3 additions & 1 deletion app/livechat/server/lib/Livechat.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,9 @@ export const Livechat = {
return true;
},

registerGuest({ token, name, email, department, phone, username, connectionData } = {}) {
registerGuest({ id, token, name, email, department, phone, username, connectionData } = {}) {
check(token, String);
check(id, Match.Maybe(String));

let userId;
const updateUser = {
Expand Down Expand Up @@ -264,6 +265,7 @@ export const Livechat = {
const userData = {
username,
ts: new Date(),
...id && { _id: id },
};

if (settings.get('Livechat_Allow_collect_and_store_HTTP_header_informations')) {
Expand Down
1 change: 1 addition & 0 deletions server/features/EmailInbox/EmailInbox_Incoming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ function getGuestByEmail(email: string, name: string, department?: string): any
phone: undefined,
username: undefined,
connectionData: undefined,
id: undefined,
});

const newGuest = LivechatVisitors.findOneById(userId, {});
Expand Down