nohup: ignoring input
{}
Server is running on port 3001
51
{
  role_id: 2,
  name: 'dev',
  real_name: 'john ',
  company_id: 1,
  canCreateUsers: 1,
  canCreateBrand: 1
}
51
{
  role_id: 2,
  name: 'dev',
  real_name: 'john ',
  company_id: 1,
  canCreateUsers: 1,
  canCreateBrand: 1
}
Admin connected: 51
{}
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjUxLCJpYXQiOjE3MzEwNzg1NjIsImV4cCI6MTczMTY4MzM2Mn0.hJWHJZXd_cYYvC6brZzxfRM_C8rlFMrPndlz5jXPQpY
user
{
  role_id: 2,
  name: 'dev',
  real_name: 'john ',
  company_id: 1,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 51, role: 2, company_id: 1 }
{ userId: 51, role: 2, company_id: 1 }
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Client connected: m36jho45bm
Client connected
public key d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
chatKey: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
New visitor session created for client m36jho45bm
visotor is here
query have been done []  now move  null
No active visitor session found. Creating a new session...
visitor status change {
  client_id: 'm36jho45bm',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  status: 1
}
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
1 status
Notification to client m36jho45bm: visitor chat status changed
admins is fetched
Admin 51 notified of visitor m36jho45bm status change.
Admin 51 notified of visitor m36jho45bm status change.
Admin 51 notified of visitor m36jho45bm status change.
Visitor session status set to 3 for client m36jho45bm
new client {
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  widgetId: 'c30ffcdc-672c-4154-bdd5-6ba2e6f3ae3a-1730937386922',
  domain: 'chatknot.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Windows',
  url: 'https://chatknot.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm36jho45bm',
  joinTime: '11/11/2024, 3:27:27 PM'
}
Received visitor URL update: {
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  widgetId: 'c30ffcdc-672c-4154-bdd5-6ba2e6f3ae3a-1730937386922',
  domain: 'chatknot.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Windows',
  url: 'https://chatknot.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm36jho45bm',
  joinTime: '11/11/2024, 3:27:27 PM'
}
No active visitor session found. Creating a new session...
Admins fetched
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://chatknot.com/',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm36jho45bm'
}
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://chatknot.com/',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm36jho45bm'
}
{ user_id: 53 }
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://chatknot.com/',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm36jho45bm'
}
{ user_id: 53 }
reset inactivity ...
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
{
  inactivityTimeout: null,
  disconnectTimeout: null,
  statusTimeout: 1,
  lastStatus: 1,
  isConnected: true,
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713'
}
Public key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
New visitor session created: {
  sessionResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 113,
    info: '',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 0
  },
  visitorUpdateResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 0,
    info: 'Rows matched: 1  Changed: 1  Warnings: 0',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 1
  }
}
Admin 51 notified of existing chat with client m36jho45bm from Pakistan (Karachi) on brand chatknot
Admin 51 notified of existing chat with client m36jho45bm from Pakistan (Karachi) on brand chatknot
Admin 51 notified of existing chat with client m36jho45bm from Pakistan (Karachi) on brand chatknot
Client connected: m36ki0nzz7
Client connected
public key d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
chatKey: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7
New visitor session created for client m36ki0nzz7
visotor is here
query have been done []  now move  null
No active visitor session found. Creating a new session...
visitor status change {
  client_id: 'm36ki0nzz7',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  status: 1
}
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
1 status
Notification to client m36ki0nzz7: visitor chat status changed
admins is fetched
Admin 51 notified of visitor m36ki0nzz7 status change.
Admin 51 notified of visitor m36ki0nzz7 status change.
Admin 51 notified of visitor m36ki0nzz7 status change.
Visitor session status set to 3 for client m36ki0nzz7
new client {
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  widgetId: 'c30ffcdc-672c-4154-bdd5-6ba2e6f3ae3a-1730937386922',
  domain: 'www.chatknot.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Windows',
  url: 'https://www.chatknot.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm36ki0nzz7',
  joinTime: '11/11/2024, 3:28:24 PM'
}
Received visitor URL update: {
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  widgetId: 'c30ffcdc-672c-4154-bdd5-6ba2e6f3ae3a-1730937386922',
  domain: 'www.chatknot.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Windows',
  url: 'https://www.chatknot.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm36ki0nzz7',
  joinTime: '11/11/2024, 3:28:24 PM'
}
No active visitor session found. Creating a new session...
Admins fetched
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://www.chatknot.com/',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm36ki0nzz7'
}
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://www.chatknot.com/',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm36ki0nzz7'
}
{ user_id: 53 }
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://www.chatknot.com/',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm36ki0nzz7'
}
{ user_id: 53 }
reset inactivity ...
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
{
  inactivityTimeout: null,
  disconnectTimeout: null,
  statusTimeout: 1,
  lastStatus: 1,
  isConnected: true,
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713'
}
Public key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
New visitor session created: {
  sessionResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 114,
    info: '',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 0
  },
  visitorUpdateResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 0,
    info: 'Rows matched: 1  Changed: 1  Warnings: 0',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 1
  }
}
Admin 51 notified of existing chat with client m36ki0nzz7 from Pakistan (Karachi) on brand chatknot
Admin 51 notified of existing chat with client m36ki0nzz7 from Pakistan (Karachi) on brand chatknot
Admin 51 notified of existing chat with client m36ki0nzz7 from Pakistan (Karachi) on brand chatknot
Admin 51 disconnected
51
{
  role_id: 2,
  name: 'dev',
  real_name: 'john ',
  company_id: 1,
  canCreateUsers: 1,
  canCreateBrand: 1
}
Admin connected: 51
{}
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
{
  name: null,
  client_id: 'm36ki0nzz7',
  online: '2024-11-11T10:28:24.000Z',
  servedBy: null,
  viewing: 'https://www.chatknot.com/',
  link: 'https://example.com',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  join_time: '3:28 PM',
  visitorStatus: 1,
  visitor_session_id: 114,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'chatknot',
  realName: 'john ',
  userId: 51
}
result of chat sessions....
[]
Successfully updated visitor session with chat_session_id: 79
No rating found for session 79
[
  { user_id: 51 },
  { user_id: 51 },
  { user_id: 53 },
  { user_id: 51 },
  { user_id: 53 }
]
Admin 51 notified of visitor undefined served by update.
Admin 51 notified of visitor undefined served by update.
Admin 51 notified of visitor undefined served by update.
new session served by emitted
Admin 51 joined chat with client m36ki0nzz7
chat message emit for comment
Chat session updated as joined: 1
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
Marking all unseen messages as seen for chat: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7
No unseen messages found for chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7.
join_time of active session:  2024-11-11T10:28:19.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:28:23.000Z,
  left_time: null
}
Total visitor sessions: 1
Total chat sessions: 1
Here is chat key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7
client data {
  name: null,
  client_id: 'm36ki0nzz7',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
Here is chat key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7
client data {
  name: null,
  client_id: 'm36ki0nzz7',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
Marking all unseen messages as seen for chat: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7
No unseen messages found for chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7.
Participant already exists.
Participant already exists.
activeChats....
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(1) { 51 }, messages: [] }
}
Active session exists for client: m36ki0nzz7
session id =  79
Admin 51 sent message to chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7: hi
[]
{
  name: null,
  client_id: 'm36jho45bm',
  online: '2024-11-11T10:27:28.000Z',
  servedBy: null,
  viewing: 'https://chatknot.com/',
  link: 'https://example.com',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  join_time: '3:27 PM',
  visitorStatus: 1,
  visitor_session_id: 113,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'chatknot',
  realName: 'john ',
  userId: 51
}
result of chat sessions....
[]
Successfully updated visitor session with chat_session_id: 80
No rating found for session 80
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
[
  { user_id: 51 },
  { user_id: 51 },
  { user_id: 53 },
  { user_id: 51 },
  { user_id: 53 }
]
Admin 51 notified of visitor undefined served by update.
Admin 51 notified of visitor undefined served by update.
Admin 51 notified of visitor undefined served by update.
new session served by emitted
Admin 51 joined chat with client m36jho45bm
chat message emit for comment
Chat session updated as joined: 1
join_time of active session:  2024-11-11T10:27:23.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:27:28.000Z,
  left_time: null
}
Total visitor sessions: 1
Total chat sessions: 1
Marking all unseen messages as seen for chat: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
No unseen messages found for chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm.
Here is chat key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
last message id null
is old chat false
client data {
  name: null,
  client_id: 'm36jho45bm',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
Here is chat key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
client data {
  name: null,
  client_id: 'm36jho45bm',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
Marking all unseen messages as seen for chat: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
No unseen messages found for chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm.
Participant already exists.
Participant already exists.
activeChats....
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(1) { 51 }, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(1) { 51 }, messages: [] }
}
Active session exists for client: m36jho45bm
session id =  80
Admin 51 sent message to chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm: hi
[]
Client m36ki0nzz7 disconnected
Status timeout already running for client m36ki0nzz7.
Client connected: m36ki0nzz7
Client connected
public key d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
chatKey: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7
Existing session found for client m36ki0nzz7
Cleared existing inactivityTimeout for client m36ki0nzz7
Cleared existing statusTimeout for client m36ki0nzz7
Cleared existing disconnectTimeout for client m36ki0nzz7
visotor is here
Visitor session status reset to active for client m36ki0nzz7
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
1 status
Notification to client m36ki0nzz7: Visitor status change
query have been done [
  {
    id: 114,
    client_id: 'm36ki0nzz7',
    chat_session_id: 79,
    join_time: 2024-11-11T10:28:24.000Z,
    left_time: null,
    public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
    landing_url: 'https://www.chatknot.com/',
    status: 1,
    IP_Health: 1
  }
]  now move  null
Existing visitor session found: {
  id: 114,
  client_id: 'm36ki0nzz7',
  chat_session_id: 79,
  join_time: 2024-11-11T10:28:24.000Z,
  left_time: null,
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  landing_url: 'https://www.chatknot.com/',
  status: 1,
  IP_Health: 1
}
visitor status { status: 1, client_id: 'm36ki0nzz7' }
Reconnect within one minute, using the existing session.
public key 1 d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
reset inactivity ...
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
{
  inactivityTimeout: null,
  disconnectTimeout: null,
  statusTimeout: null,
  lastStatus: 1,
  isConnected: true,
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713'
}
Public key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
admins is fetched
Admin 51 notified of visitor m36ki0nzz7 status change.
Admin 51 notified of visitor m36ki0nzz7 status change.
Admin 51 notified of visitor m36ki0nzz7 status change.
Received visitor URL update: {
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  widgetId: 'c30ffcdc-672c-4154-bdd5-6ba2e6f3ae3a-1730937386922',
  domain: 'www.chatknot.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Windows',
  url: 'https://www.chatknot.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm36ki0nzz7',
  joinTime: '11/11/2024, 3:31:10 PM'
}
Admins fetched
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://www.chatknot.com/',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm36ki0nzz7'
}
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://www.chatknot.com/',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm36ki0nzz7'
}
{ user_id: 53 }
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://www.chatknot.com/',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm36ki0nzz7'
}
{ user_id: 53 }
visitor status change {
  client_id: 'm36ki0nzz7',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  status: 1
}
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
1 status
Notification to client m36ki0nzz7: visitor chat status changed
get chat history
chat key
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7
admins is fetched
Admin 51 notified of visitor m36ki0nzz7 status change.
Admin 51 notified of visitor m36ki0nzz7 status change.
Admin 51 notified of visitor m36ki0nzz7 status change.
Visitor session status set to 3 for client m36ki0nzz7
[
  {
    session_id: 79,
    chat_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7',
    public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
    served_by: 'john ',
    client_id: 'm36ki0nzz7',
    visitor_id: 114,
    chat_initiated_time: 2024-11-11T10:29:33.000Z,
    chat_start_time: 2024-11-11T10:29:33.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:29:33.000Z,
    tags: null,
    notes: null
  }
]
test key 
[ { session_id: 79 } ]
51
Emitting total unseen messages to client m36ki0nzz7: 1
sent the messages to client
Client seen message ID: 499
Marking message as seen for chat: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7
Message ID 499 marked as seen for chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7.
Admins fetched
{ user_id: 51 }
Admin 51 notified with event 'message_seen by client' and data: {
  client_id: 'm36ki0nzz7',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  is_seen: 1,
  message_id: '499'
}
{ user_id: 51 }
Admin 51 notified with event 'message_seen by client' and data: {
  client_id: 'm36ki0nzz7',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  is_seen: 1,
  message_id: '499'
}
{ user_id: 53 }
{ user_id: 51 }
Admin 51 notified with event 'message_seen by client' and data: {
  client_id: 'm36ki0nzz7',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  is_seen: 1,
  message_id: '499'
}
{ user_id: 53 }
Active session exists for client: m36jho45bm
Handling message for session: 80
Visitor added as participant in session 80
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
chatKey
Visitor sent message to chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm: hi
51,m36jho45bm
Number of valid numeric participants: [ 51 ]
All participants (including client IDs): [ '51', 'm36jho45bm' ]
Marking all unseen messages as seen for chat: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
All unseen messages marked as seen for chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm.
Admins fetched
{ user_id: 51 }
Admin 51 notified with event 'message_seen' and data: {
  client_id: 'm36jho45bm',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  isSeen: 1
}
{ user_id: 51 }
Admin 51 notified with event 'message_seen' and data: {
  client_id: 'm36jho45bm',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  isSeen: 1
}
{ user_id: 53 }
{ user_id: 51 }
Admin 51 notified with event 'message_seen' and data: {
  client_id: 'm36jho45bm',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  isSeen: 1
}
{ user_id: 53 }
admin left the chat from d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
{ participants: Set(1) { 51 }, messages: [] }
{ participants: Set(0) {}, messages: [] }
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
Active session exists for client: m36jho45bm
Handling message for session: 80
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
chatKey
Visitor sent message to chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm: ?
51,m36jho45bm
Number of valid numeric participants: [ 51 ]
All participants (including client IDs): [ '51', 'm36jho45bm' ]
Admins fetched
notifyAllAdmins: false
Admin 51 notified with event 'New message blink', participant: true
Admin 51 notified with event 'New message blink', participant: true
No socket connection found for admin 53
Admin 51 notified with event 'New message blink', participant: true
No socket connection found for admin 53
Client m36jho45bm disconnected
Status timeout already running for client m36jho45bm.
Client connected: m36jho45bm
Client connected
public key d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
chatKey: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
Existing session found for client m36jho45bm
Cleared existing inactivityTimeout for client m36jho45bm
Cleared existing statusTimeout for client m36jho45bm
Cleared existing disconnectTimeout for client m36jho45bm
visotor is here
Visitor session status reset to active for client m36jho45bm
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
1 status
Notification to client m36jho45bm: Visitor status change
query have been done [
  {
    id: 113,
    client_id: 'm36jho45bm',
    chat_session_id: 80,
    join_time: 2024-11-11T10:27:28.000Z,
    left_time: null,
    public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
    landing_url: 'https://chatknot.com/',
    status: 1,
    IP_Health: 1
  }
]  now move  null
Existing visitor session found: {
  id: 113,
  client_id: 'm36jho45bm',
  chat_session_id: 80,
  join_time: 2024-11-11T10:27:28.000Z,
  left_time: null,
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  landing_url: 'https://chatknot.com/',
  status: 1,
  IP_Health: 1
}
visitor status { status: 1, client_id: 'm36jho45bm' }
Reconnect within one minute, using the existing session.
public key 1 d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
reset inactivity ...
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
{
  inactivityTimeout: null,
  disconnectTimeout: null,
  statusTimeout: null,
  lastStatus: 1,
  isConnected: true,
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713'
}
Public key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
admins is fetched
Admin 51 notified of visitor m36jho45bm status change.
Admin 51 notified of visitor m36jho45bm status change.
Admin 51 notified of visitor m36jho45bm status change.
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
visitor status change {
  client_id: 'm36jho45bm',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  status: 1
}
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
1 status
Notification to client m36jho45bm: visitor chat status changed
admins is fetched
Admin 51 notified of visitor m36jho45bm status change.
Admin 51 notified of visitor m36jho45bm status change.
Admin 51 notified of visitor m36jho45bm status change.
Visitor session status set to 3 for client m36jho45bm
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
get chat history
chat key
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
[
  {
    session_id: 80,
    chat_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm',
    public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
    served_by: 'john ',
    client_id: 'm36jho45bm',
    visitor_id: 113,
    chat_initiated_time: 2024-11-11T10:29:41.000Z,
    chat_start_time: 2024-11-11T10:29:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:29:41.000Z,
    tags: null,
    notes: null
  }
]
test key 
[ { session_id: 80 } ]
51
Emitting total unseen messages to client m36jho45bm: 1
sent the messages to client
Received visitor URL update: {
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  widgetId: 'c30ffcdc-672c-4154-bdd5-6ba2e6f3ae3a-1730937386922',
  domain: 'chatknot.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Windows',
  url: 'https://chatknot.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm36jho45bm',
  joinTime: '11/11/2024, 3:32:12 PM'
}
Admins fetched
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://chatknot.com/',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm36jho45bm'
}
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://chatknot.com/',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm36jho45bm'
}
{ user_id: 53 }
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://chatknot.com/',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm36jho45bm'
}
{ user_id: 53 }
Client seen message ID: 501
Marking message as seen for chat: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
Message ID 501 marked as seen for chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm.
Admins fetched
{ user_id: 51 }
Admin 51 notified with event 'message_seen by client' and data: {
  client_id: 'm36jho45bm',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  is_seen: 1,
  message_id: '501'
}
{ user_id: 51 }
Admin 51 notified with event 'message_seen by client' and data: {
  client_id: 'm36jho45bm',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  is_seen: 1,
  message_id: '501'
}
{ user_id: 53 }
{ user_id: 51 }
Admin 51 notified with event 'message_seen by client' and data: {
  client_id: 'm36jho45bm',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  is_seen: 1,
  message_id: '501'
}
{ user_id: 53 }
Updating profile of client: { client_id: 'm36jho45bm', name: 'Hasnain', email: '', phone: '' }
Profile updated successfully: { name: 'Hasnain' }
Admins fetched
{ user_id: 51 }
Admin 51 notified with event 'client data updated' and data: { name: 'Hasnain' }
{ user_id: 51 }
Admin 51 notified with event 'client data updated' and data: { name: 'Hasnain' }
{ user_id: 53 }
{ user_id: 51 }
Admin 51 notified with event 'client data updated' and data: { name: 'Hasnain' }
{ user_id: 53 }
visitor status change {
  client_id: 'm36jho45bm',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  status: 3
}
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
3 status
Notification to client m36jho45bm: visitor chat status changed
admins is fetched
Admin 51 notified of visitor m36jho45bm status change.
Admin 51 notified of visitor m36jho45bm status change.
Admin 51 notified of visitor m36jho45bm status change.
Visitor session status set to 3 for client m36jho45bm
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
Client connected: m37akwmjnv
Client connected
public key d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
chatKey: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv
New visitor session created for client m37akwmjnv
visotor is here
query have been done []  now move  null
No active visitor session found. Creating a new session...
visitor status change {
  client_id: 'm37akwmjnv',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  status: 1
}
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
1 status
Notification to client m37akwmjnv: visitor chat status changed
admins is fetched
Admin 51 notified of visitor m37akwmjnv status change.
Admin 51 notified of visitor m37akwmjnv status change.
Admin 51 notified of visitor m37akwmjnv status change.
Visitor session status set to 3 for client m37akwmjnv
new client {
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  widgetId: 'c30ffcdc-672c-4154-bdd5-6ba2e6f3ae3a-1730937386922',
  domain: 'chatknot.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Linux',
  url: 'https://chatknot.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm37akwmjnv',
  joinTime: '11/11/2024, 3:32:46 PM'
}
Received visitor URL update: {
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  widgetId: 'c30ffcdc-672c-4154-bdd5-6ba2e6f3ae3a-1730937386922',
  domain: 'chatknot.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Linux',
  url: 'https://chatknot.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm37akwmjnv',
  joinTime: '11/11/2024, 3:32:46 PM'
}
No active visitor session found. Creating a new session...
Admins fetched
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://chatknot.com/',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm37akwmjnv'
}
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://chatknot.com/',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm37akwmjnv'
}
{ user_id: 53 }
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://chatknot.com/',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm37akwmjnv'
}
{ user_id: 53 }
reset inactivity ...
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
{
  inactivityTimeout: null,
  disconnectTimeout: null,
  statusTimeout: 1,
  lastStatus: 1,
  isConnected: true,
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713'
}
Public key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
New visitor session created: {
  sessionResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 115,
    info: '',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 0
  },
  visitorUpdateResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 0,
    info: 'Rows matched: 1  Changed: 1  Warnings: 0',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 1
  }
}
Admin 51 notified of existing chat with client m37akwmjnv from Pakistan (Karachi) on brand chatknot
Admin 51 notified of existing chat with client m37akwmjnv from Pakistan (Karachi) on brand chatknot
Admin 51 notified of existing chat with client m37akwmjnv from Pakistan (Karachi) on brand chatknot
Client m37akwmjnv disconnected
Status timeout already running for client m37akwmjnv.
Client connected: m37akwmjnv
Client connected
public key d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
chatKey: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv
Existing session found for client m37akwmjnv
Cleared existing inactivityTimeout for client m37akwmjnv
Cleared existing statusTimeout for client m37akwmjnv
Cleared existing disconnectTimeout for client m37akwmjnv
visotor is here
Visitor session status reset to active for client m37akwmjnv
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
1 status
Notification to client m37akwmjnv: Visitor status change
query have been done [
  {
    id: 115,
    client_id: 'm37akwmjnv',
    chat_session_id: null,
    join_time: 2024-11-11T10:32:48.000Z,
    left_time: null,
    public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
    landing_url: 'https://chatknot.com/',
    status: 1,
    IP_Health: 1
  }
]  now move  null
Existing visitor session found: {
  id: 115,
  client_id: 'm37akwmjnv',
  chat_session_id: null,
  join_time: 2024-11-11T10:32:48.000Z,
  left_time: null,
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  landing_url: 'https://chatknot.com/',
  status: 1,
  IP_Health: 1
}
visitor status { status: 1, client_id: 'm37akwmjnv' }
Reconnect within one minute, using the existing session.
public key 1 d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
reset inactivity ...
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
{
  inactivityTimeout: null,
  disconnectTimeout: null,
  statusTimeout: null,
  lastStatus: 1,
  isConnected: true,
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713'
}
Public key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
admins is fetched
Admin 51 notified of visitor m37akwmjnv status change.
Admin 51 notified of visitor m37akwmjnv status change.
Admin 51 notified of visitor m37akwmjnv status change.
visitor status change {
  client_id: 'm37akwmjnv',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  status: 1
}
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
1 status
Notification to client m37akwmjnv: visitor chat status changed
admins is fetched
Admin 51 notified of visitor m37akwmjnv status change.
Admin 51 notified of visitor m37akwmjnv status change.
Admin 51 notified of visitor m37akwmjnv status change.
Visitor session status set to 3 for client m37akwmjnv
get chat history
chat key
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv
Received visitor URL update: {
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  widgetId: 'c30ffcdc-672c-4154-bdd5-6ba2e6f3ae3a-1730937386922',
  domain: 'chatknot.com',
  browser: {
    userAgent: 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36',
    platform: 'Linux armv81',
    language: 'en-US'
  },
  os: 'Android',
  url: 'https://chatknot.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm37akwmjnv',
  joinTime: '11/11/2024, 3:33:12 PM'
}
[]
[]
No active chat session found.
Admins fetched
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://chatknot.com/',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm37akwmjnv'
}
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://chatknot.com/',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm37akwmjnv'
}
{ user_id: 53 }
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://chatknot.com/',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm37akwmjnv'
}
{ user_id: 53 }
Admin 51 disconnected
Admin connected: 51
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] }
}
51
{
  role_id: 2,
  name: 'dev',
  real_name: 'john ',
  company_id: 1,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37akwmjnv on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37akwmjnv on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
Using existing visitor session: 115
New chat session created by visitor: 81
Handling message for session: 81
Visitor added as participant in session 81
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv
chatKey
Visitor sent message to chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv: Hi
m37akwmjnv
Number of valid numeric participants: []
All participants (including client IDs): [ 'm37akwmjnv' ]
Admins fetched
notifyAllAdmins: true
Admin 51 notified with event 'New message blink', participant: true
Admin 51 notified with event 'New message blink', participant: true
No socket connection found for admin 53
Admin 51 notified with event 'New message blink', participant: true
No socket connection found for admin 53
{
  name: null,
  client_id: 'm37akwmjnv',
  online: '2024-11-11T10:32:48.000Z',
  servedBy: null,
  viewing: 'https://chatknot.com/',
  link: 'https://example.com',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  join_time: '3:32 PM',
  visitorStatus: 1,
  visitor_session_id: 115,
  os: 'Android',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'undefined undefined',
  unseenMsg: 1,
  brand_name: 'chatknot',
  realName: 'john ',
  userId: 51
}
result of chat sessions....
[
  {
    session_id: 81,
    chat_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv',
    public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
    served_by: '',
    client_id: 'm37akwmjnv',
    visitor_id: 115,
    chat_initiated_time: 2024-11-11T10:33:29.000Z,
    chat_start_time: null,
    chat_end_time: null,
    is_join: 0,
    is_active: 1,
    created_at: 2024-11-11T10:33:29.000Z,
    tags: null,
    notes: null
  }
]
No admin assigned to this client
[
  {
    session_id: 81,
    chat_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv',
    public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
    served_by: '',
    client_id: 'm37akwmjnv',
    visitor_id: 115,
    chat_initiated_time: 2024-11-11T10:33:29.000Z,
    chat_start_time: null,
    chat_end_time: null,
    is_join: 0,
    is_active: 1,
    created_at: 2024-11-11T10:33:29.000Z,
    tags: null,
    notes: null
  }
]
room key d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv
Active session exists for client: m37akwmjnv
Admin 51 joined chat with client m37akwmjnv
No rating found for session 81
chat message emit for comment
New participant inserted
Admins fetched
{ user_id: 51 }
Admin 51 notified with event 'visitor served by update' and data: {
  client_id: 'm37akwmjnv',
  realName: 'john ',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  served_by: 'john '
}
{ user_id: 51 }
Admin 51 notified with event 'visitor served by update' and data: {
  client_id: 'm37akwmjnv',
  realName: 'john ',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  served_by: 'john '
}
{ user_id: 53 }
{ user_id: 51 }
Admin 51 notified with event 'visitor served by update' and data: {
  client_id: 'm37akwmjnv',
  realName: 'john ',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  served_by: 'john '
}
{ user_id: 53 }
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37akwmjnv on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
Emitting visitor data for client m37akwmjnv on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
Marking all unseen messages as seen for chat: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv
All unseen messages marked as seen for chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv.
Admins fetched
{ user_id: 51 }
Admin 51 notified with event 'message_seen' and data: {
  client_id: 'm37akwmjnv',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  isSeen: 1
}
{ user_id: 51 }
Admin 51 notified with event 'message_seen' and data: {
  client_id: 'm37akwmjnv',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  isSeen: 1
}
{ user_id: 53 }
{ user_id: 51 }
Admin 51 notified with event 'message_seen' and data: {
  client_id: 'm37akwmjnv',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  isSeen: 1
}
{ user_id: 53 }
Marking all unseen messages as seen for chat: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv
No unseen messages found for chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv.
join_time of active session:  2024-11-11T10:32:43.000Z
Visitor metadata: {
  os: 'Linux',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:32:47.000Z,
  left_time: null
}
Total visitor sessions: 2
Total chat sessions: 2
Here is chat key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv
client data {
  name: null,
  client_id: 'm37akwmjnv',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
Here is chat key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv
client data {
  name: null,
  client_id: 'm37akwmjnv',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
Marking all unseen messages as seen for chat: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv
No unseen messages found for chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv.
last message id 504
is old chat true
chat key
last message id 504
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
Marking all unseen messages as seen for chat: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv
No unseen messages found for chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv.
{
  name: 'Hasnain',
  client_id: 'm36jho45bm',
  online: '2024-11-11T10:27:28.000Z',
  servedBy: 'john ',
  viewing: 'https://chatknot.com/',
  link: 'https://example.com',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  join_time: '3:27 PM',
  visitorStatus: 3,
  visitor_session_id: 113,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 1,
  brand_name: 'chatknot',
  realName: 'john ',
  userId: 51
}
result of chat sessions....
[
  {
    session_id: 80,
    chat_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm',
    public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
    served_by: 'john ',
    client_id: 'm36jho45bm',
    visitor_id: 113,
    chat_initiated_time: 2024-11-11T10:29:41.000Z,
    chat_start_time: 2024-11-11T10:29:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:29:41.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 80,
    chat_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm',
    public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
    served_by: 'john ',
    client_id: 'm36jho45bm',
    visitor_id: 113,
    chat_initiated_time: 2024-11-11T10:29:41.000Z,
    chat_start_time: 2024-11-11T10:29:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:29:41.000Z,
    tags: null,
    notes: null
  }
]
room key d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
Active session exists for client: m36jho45bm
Admin 51 joined chat with client m36jho45bm
No rating found for session 80
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Marking all unseen messages as seen for chat: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
All unseen messages marked as seen for chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm.
Emitting visitor data for client m37akwmjnv on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
Admins fetched
{ user_id: 51 }
Admin 51 notified with event 'message_seen' and data: {
  client_id: 'm36jho45bm',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  isSeen: 1
}
{ user_id: 51 }
Admin 51 notified with event 'message_seen' and data: {
  client_id: 'm36jho45bm',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  isSeen: 1
}
{ user_id: 53 }
{ user_id: 51 }
Admin 51 notified with event 'message_seen' and data: {
  client_id: 'm36jho45bm',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  isSeen: 1
}
{ user_id: 53 }
Emitting visitor data for client m37akwmjnv on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
join_time of active session:  2024-11-11T10:27:23.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:27:28.000Z,
  left_time: null
}
Total visitor sessions: 1
Total chat sessions: 1
Here is chat key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
client data {
  name: 'Hasnain',
  client_id: 'm36jho45bm',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
last message id null
is old chat false
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
Marking all unseen messages as seen for chat: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
No unseen messages found for chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm.
Participant added.
51
[
  {
    participant_id: 148,
    session_id: 80,
    user_id: '51',
    role: 'admin',
    join_time: 2024-11-11T10:29:41.000Z
  }
]
Active session exists for client: 80
Admin 51 joined chat with client 80
Participant already exists.
activeChats....
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(1) { 51 }, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv': { participants: Set(1) { 51 }, messages: [] }
}
Active session exists for client: m36jho45bm
session id =  80
Admin 51 sent message to chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm: hi
[ { status: 3 } ]
3
51
80
Emitting unseen messages to client: 1
visitor status change {
  client_id: 'm36jho45bm',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  status: 1
}
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
1 status
Notification to client m36jho45bm: visitor chat status changed
admins is fetched
Admin 51 notified of visitor m36jho45bm status change.
Admin 51 notified of visitor m36jho45bm status change.
Admin 51 notified of visitor m36jho45bm status change.
Visitor session status set to 3 for client m36jho45bm
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37akwmjnv on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37akwmjnv on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
Here is chat key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
client data {
  name: 'Hasnain',
  client_id: 'm36jho45bm',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id 500
is old chat true
chat key
{
  name: null,
  client_id: 'm36ki0nzz7',
  online: '2024-11-11T10:28:24.000Z',
  servedBy: 'john ',
  viewing: 'https://www.chatknot.com/',
  link: 'https://example.com',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  join_time: '3:28 PM',
  visitorStatus: 1,
  visitor_session_id: 114,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'chatknot',
  realName: 'john ',
  userId: 51
}
result of chat sessions....
[
  {
    session_id: 79,
    chat_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7',
    public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
    served_by: 'john ',
    client_id: 'm36ki0nzz7',
    visitor_id: 114,
    chat_initiated_time: 2024-11-11T10:29:33.000Z,
    chat_start_time: 2024-11-11T10:29:33.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:29:33.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 79,
    chat_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7',
    public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
    served_by: 'john ',
    client_id: 'm36ki0nzz7',
    visitor_id: 114,
    chat_initiated_time: 2024-11-11T10:29:33.000Z,
    chat_start_time: 2024-11-11T10:29:33.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:29:33.000Z,
    tags: null,
    notes: null
  }
]
room key d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7
Active session exists for client: m36ki0nzz7
Admin 51 joined chat with client m36ki0nzz7
No rating found for session 79
Here is chat key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7
client data {
  name: null,
  client_id: 'm36ki0nzz7',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
Emitting visitor data for client m37akwmjnv on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
Emitting visitor data for client m37akwmjnv on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
last message id null
is old chat false
join_time of active session:  2024-11-11T10:28:19.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:28:23.000Z,
  left_time: null
}
Total visitor sessions: 1
Total chat sessions: 1
last message id 498
is old chat true
chat key
Client m36ki0nzz7 disconnected
Status timeout already running for client m36ki0nzz7.
{
  name: 'Hasnain',
  client_id: 'm36jho45bm',
  online: '2024-11-11T10:27:28.000Z',
  servedBy: 'john ',
  viewing: 'https://chatknot.com/',
  link: 'https://example.com',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  join_time: '3:27 PM',
  visitorStatus: 1,
  visitor_session_id: 113,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'chatknot',
  realName: 'john ',
  userId: 51
}
result of chat sessions....
[
  {
    session_id: 80,
    chat_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm',
    public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
    served_by: 'john ',
    client_id: 'm36jho45bm',
    visitor_id: 113,
    chat_initiated_time: 2024-11-11T10:29:41.000Z,
    chat_start_time: 2024-11-11T10:29:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:29:41.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 80,
    chat_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm',
    public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
    served_by: 'john ',
    client_id: 'm36jho45bm',
    visitor_id: 113,
    chat_initiated_time: 2024-11-11T10:29:41.000Z,
    chat_start_time: 2024-11-11T10:29:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:29:41.000Z,
    tags: null,
    notes: null
  }
]
room key d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
Active session exists for client: m36jho45bm
Admin 51 joined chat with client m36jho45bm
No rating found for session 80
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37akwmjnv on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
Emitting visitor data for client m37akwmjnv on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
join_time of active session:  2024-11-11T10:27:23.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:27:28.000Z,
  left_time: null
}
Total visitor sessions: 1
Total chat sessions: 1
Here is chat key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
client data {
  name: 'Hasnain',
  client_id: 'm36jho45bm',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
admin left the chat from d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
{ participants: Set(1) { 51 }, messages: [] }
{ participants: Set(0) {}, messages: [] }
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37akwmjnv on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
Emitting visitor data for client m37akwmjnv on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
Client connected: m36ki0nzz7
Client connected
public key d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
chatKey: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7
Existing session found for client m36ki0nzz7
Cleared existing inactivityTimeout for client m36ki0nzz7
Cleared existing statusTimeout for client m36ki0nzz7
Cleared existing disconnectTimeout for client m36ki0nzz7
visotor is here
Visitor session status reset to active for client m36ki0nzz7
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
1 status
Notification to client m36ki0nzz7: Visitor status change
query have been done [
  {
    id: 114,
    client_id: 'm36ki0nzz7',
    chat_session_id: 79,
    join_time: 2024-11-11T10:28:24.000Z,
    left_time: null,
    public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
    landing_url: 'https://www.chatknot.com/',
    status: 1,
    IP_Health: 1
  }
]  now move  null
Existing visitor session found: {
  id: 114,
  client_id: 'm36ki0nzz7',
  chat_session_id: 79,
  join_time: 2024-11-11T10:28:24.000Z,
  left_time: null,
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  landing_url: 'https://www.chatknot.com/',
  status: 1,
  IP_Health: 1
}
visitor status { status: 1, client_id: 'm36ki0nzz7' }
Reconnect within one minute, using the existing session.
public key 1 d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
reset inactivity ...
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
{
  inactivityTimeout: null,
  disconnectTimeout: null,
  statusTimeout: null,
  lastStatus: 1,
  isConnected: true,
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713'
}
Public key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
admins is fetched
Admin 51 notified of visitor m36ki0nzz7 status change.
Admin 51 notified of visitor m36ki0nzz7 status change.
Admin 51 notified of visitor m36ki0nzz7 status change.
Received visitor URL update: {
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  widgetId: 'c30ffcdc-672c-4154-bdd5-6ba2e6f3ae3a-1730937386922',
  domain: 'www.chatknot.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Windows',
  url: 'https://www.chatknot.com/use-case',
  referrer: 'https://www.chatknot.com/',
  ip: '',
  country: '',
  city: '',
  clientId: 'm36ki0nzz7',
  joinTime: '11/11/2024, 3:34:19 PM'
}
Admins fetched
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://www.chatknot.com/use-case',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm36ki0nzz7'
}
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://www.chatknot.com/use-case',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm36ki0nzz7'
}
{ user_id: 53 }
{ user_id: 51 }
Admin 51 notified with event 'visitor url update' and data: {
  url: 'https://www.chatknot.com/use-case',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  clientId: 'm36ki0nzz7'
}
{ user_id: 53 }
visitor status change {
  client_id: 'm36ki0nzz7',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  status: 1
}
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
1 status
Notification to client m36ki0nzz7: visitor chat status changed
get chat history
chat key
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7
admins is fetched
Admin 51 notified of visitor m36ki0nzz7 status change.
Admin 51 notified of visitor m36ki0nzz7 status change.
Admin 51 notified of visitor m36ki0nzz7 status change.
Visitor session status set to 3 for client m36ki0nzz7
[
  {
    session_id: 79,
    chat_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7',
    public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
    served_by: 'john ',
    client_id: 'm36ki0nzz7',
    visitor_id: 114,
    chat_initiated_time: 2024-11-11T10:29:33.000Z,
    chat_start_time: 2024-11-11T10:29:33.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:29:33.000Z,
    tags: null,
    notes: null
  }
]
test key 
[ { session_id: 79 } ]
51
Emitting total unseen messages to client m36ki0nzz7: 0
sent the messages to client
{
  name: null,
  client_id: 'm36ki0nzz7',
  online: '2024-11-11T10:28:24.000Z',
  servedBy: 'john ',
  viewing: 'https://www.chatknot.com/',
  link: 'https://example.com',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  join_time: '3:28 PM',
  visitorStatus: 1,
  visitor_session_id: 114,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'chatknot',
  realName: 'john ',
  userId: 51
}
result of chat sessions....
[
  {
    session_id: 79,
    chat_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7',
    public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
    served_by: 'john ',
    client_id: 'm36ki0nzz7',
    visitor_id: 114,
    chat_initiated_time: 2024-11-11T10:29:33.000Z,
    chat_start_time: 2024-11-11T10:29:33.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:29:33.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 79,
    chat_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7',
    public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
    served_by: 'john ',
    client_id: 'm36ki0nzz7',
    visitor_id: 114,
    chat_initiated_time: 2024-11-11T10:29:33.000Z,
    chat_start_time: 2024-11-11T10:29:33.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:29:33.000Z,
    tags: null,
    notes: null
  }
]
room key d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7
Active session exists for client: m36ki0nzz7
Admin 51 joined chat with client m36ki0nzz7
No rating found for session 79
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37akwmjnv on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
Emitting visitor data for client m37akwmjnv on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
join_time of active session:  2024-11-11T10:28:19.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:28:23.000Z,
  left_time: null
}
Total visitor sessions: 1
Total chat sessions: 1
Here is chat key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7
client data {
  name: null,
  client_id: 'm36ki0nzz7',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
Received client data update: {
  client_id: 'm36ki0nzz7',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  name: '',
  email: '',
  phone: '',
  notes: '',
  tags: []
}
Client data updated successfully for client_id: m36ki0nzz7
Chat session tags updated successfully for chat_key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7
Admins fetched
{ user_id: 51 }
Admin 51 notified with event 'client data updated' and data: {
  client_id: 'm36ki0nzz7',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  name: '',
  email: '',
  phone: '',
  notes: '',
  tags: []
}
{ user_id: 51 }
Admin 51 notified with event 'client data updated' and data: {
  client_id: 'm36ki0nzz7',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  name: '',
  email: '',
  phone: '',
  notes: '',
  tags: []
}
{ user_id: 53 }
{ user_id: 51 }
Admin 51 notified with event 'client data updated' and data: {
  client_id: 'm36ki0nzz7',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  name: '',
  email: '',
  phone: '',
  notes: '',
  tags: []
}
{ user_id: 53 }
last message id 498
is old chat true
chat key
Updating profile of client: { client_id: 'm36ki0nzz7', name: 'abcd', email: '', phone: '' }
Profile updated successfully: { name: 'abcd' }
Admins fetched
{ user_id: 51 }
Admin 51 notified with event 'client data updated' and data: { name: 'abcd' }
{ user_id: 51 }
Admin 51 notified with event 'client data updated' and data: { name: 'abcd' }
{ user_id: 53 }
{ user_id: 51 }
Admin 51 notified with event 'client data updated' and data: { name: 'abcd' }
{ user_id: 53 }
admin left the chat from d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7
{ participants: Set(1) { 51 }, messages: [] }
{ participants: Set(0) {}, messages: [] }
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37akwmjnv on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
{
  name: 'abcd',
  client_id: 'm36ki0nzz7',
  online: '2024-11-11T10:28:24.000Z',
  servedBy: 'john ',
  viewing: 'https://www.chatknot.com/',
  link: 'https://example.com',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  join_time: '3:28 PM',
  visitorStatus: 1,
  visitor_session_id: 114,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'chatknot',
  realName: 'john ',
  userId: 51
}
result of chat sessions....
[
  {
    session_id: 79,
    chat_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7',
    public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
    served_by: 'john ',
    client_id: 'm36ki0nzz7',
    visitor_id: 114,
    chat_initiated_time: 2024-11-11T10:29:33.000Z,
    chat_start_time: 2024-11-11T10:29:33.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:29:33.000Z,
    tags: '[]',
    notes: ''
  }
]
[
  {
    session_id: 79,
    chat_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7',
    public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
    served_by: 'john ',
    client_id: 'm36ki0nzz7',
    visitor_id: 114,
    chat_initiated_time: 2024-11-11T10:29:33.000Z,
    chat_start_time: 2024-11-11T10:29:33.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:29:33.000Z,
    tags: '[]',
    notes: ''
  }
]
room key d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7
Active session exists for client: m36ki0nzz7
Admin 51 joined chat with client m36ki0nzz7
No rating found for session 79
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37akwmjnv on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
Emitting visitor data for client m37akwmjnv on brand chatknot
Emitting visitor data for client m36ki0nzz7 on brand chatknot
Emitting visitor data for client m36jho45bm on brand chatknot
join_time of active session:  2024-11-11T10:28:19.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:28:23.000Z,
  left_time: null
}
Total visitor sessions: 1
Total chat sessions: 1
Here is chat key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7
client data {
  name: 'abcd',
  client_id: 'm36ki0nzz7',
  email: '',
  phone: '',
  notes: '',
  tags: '[]'
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
Client seen message ID: 506
Marking message as seen for chat: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm
Message ID 506 marked as seen for chat d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm.
Admins fetched
{ user_id: 51 }
Admin 51 notified with event 'message_seen by client' and data: {
  client_id: 'm36jho45bm',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  is_seen: 1,
  message_id: '506'
}
{ user_id: 51 }
Admin 51 notified with event 'message_seen by client' and data: {
  client_id: 'm36jho45bm',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  is_seen: 1,
  message_id: '506'
}
{ user_id: 53 }
{ user_id: 51 }
Admin 51 notified with event 'message_seen by client' and data: {
  client_id: 'm36jho45bm',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  is_seen: 1,
  message_id: '506'
}
{ user_id: 53 }
Admin 51 disconnected
Client connected: m3cw0vdzqw
Client connected
public key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
chatKey: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
New visitor session created for client m3cw0vdzqw
visotor is here
query have been done []  now move  null
No active visitor session found. Creating a new session...
visitor status change {
  client_id: 'm3cw0vdzqw',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  status: 1
}
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
1 status
Notification to client m3cw0vdzqw: visitor chat status changed
admins is fetched
Visitor session status set to 3 for client m3cw0vdzqw
new client {
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  widgetId: 'd8c0c514-532f-4060-b105-151163499422-1731001762249',
  domain: 'swanbookpublishers.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Windows',
  url: 'https://swanbookpublishers.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm3cw0vdzqw',
  joinTime: '11/11/2024, 3:35:41 PM'
}
Received visitor URL update: {
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  widgetId: 'd8c0c514-532f-4060-b105-151163499422-1731001762249',
  domain: 'swanbookpublishers.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Windows',
  url: 'https://swanbookpublishers.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm3cw0vdzqw',
  joinTime: '11/11/2024, 3:35:41 PM'
}
No active visitor session found. Creating a new session...
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
{ user_id: 62 }
reset inactivity ...
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
{
  inactivityTimeout: null,
  disconnectTimeout: null,
  statusTimeout: 1,
  lastStatus: 1,
  isConnected: true,
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082'
}
Public key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
New visitor session created: {
  sessionResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 116,
    info: '',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 0
  },
  visitorUpdateResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 0,
    info: 'Rows matched: 1  Changed: 1  Warnings: 0',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 1
  }
}
admin@chatknot.com
admin@11009
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
Admin connected: 61
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv': { participants: Set(0) {}, messages: [] }
}
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjEzNTYsImV4cCI6MTczMTkyNjE1Nn0.aJGP2YGUv7nTVhlEAo0nmROR2s1J1QGzrLyZYuSkv3k
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
{ userId: 61, role: 2, company_id: 16 }
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 61 disconnected
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
Admin connected: 61
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv': { participants: Set(0) {}, messages: [] }
}
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 61 disconnected
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
Admin connected: 61
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv': { participants: Set(0) {}, messages: [] }
}
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 61 disconnected
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
Admin connected: 61
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv': { participants: Set(0) {}, messages: [] }
}
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjEzNTYsImV4cCI6MTczMTkyNjE1Nn0.aJGP2YGUv7nTVhlEAo0nmROR2s1J1QGzrLyZYuSkv3k
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
{ userId: 61, role: 2, company_id: 16 }
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjEzNTYsImV4cCI6MTczMTkyNjE1Nn0.aJGP2YGUv7nTVhlEAo0nmROR2s1J1QGzrLyZYuSkv3k
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
fetching users
fetching users 2
[
  {
    id: 60,
    real_name: 'Jennifer Conner',
    email: 'jennifer.conner@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:42:06.000Z,
    status: 1,
    name: 'Jennifer Conner',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 61,
    real_name: 'Admin',
    email: 'admin@chatknot.com',
    role_id: 2,
    designation: 'Admin',
    company_id: 16,
    created_at: 2024-11-07T17:43:08.000Z,
    status: 1,
    name: 'Admin',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 62,
    real_name: 'Melissa Richards',
    email: 'melissa.richards@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:45:02.000Z,
    status: 1,
    name: 'Melissa Richards',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  }
]
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 61 disconnected
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
Admin connected: 61
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv': { participants: Set(0) {}, messages: [] }
}
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjEzNTYsImV4cCI6MTczMTkyNjE1Nn0.aJGP2YGUv7nTVhlEAo0nmROR2s1J1QGzrLyZYuSkv3k
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
fetching users
fetching users 2
[
  {
    id: 60,
    real_name: 'Jennifer Conner',
    email: 'jennifer.conner@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:42:06.000Z,
    status: 1,
    name: 'Jennifer Conner',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 61,
    real_name: 'Admin',
    email: 'admin@chatknot.com',
    role_id: 2,
    designation: 'Admin',
    company_id: 16,
    created_at: 2024-11-07T17:43:08.000Z,
    status: 1,
    name: 'Admin',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 62,
    real_name: 'Melissa Richards',
    email: 'melissa.richards@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:45:02.000Z,
    status: 1,
    name: 'Melissa Richards',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  }
]
No active visitor session found. Fetching the last session.
join_time of last session:  2024-11-09T19:08:57.000Z
left_time of last session:  2024-11-09T19:23:57.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '43.246.224.131',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Unknown',
  created_at: 2024-11-09T19:09:00.000Z,
  left_time: 2024-11-09T19:23:57.000Z
}
Total visitor sessions: 1
Total chat sessions: 0
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3ajhav2i4
fetching urls for history...
client id m3ajhav2i4
session id  110
fetching urls for history...
client id m3ajhav2i4
session id  110
No active session found. Fetching the last session.
client data null
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37p7v3lyv
fetching urls for history...
client id m37p7v3lyv
session id  109
fetching urls for history...
client id m37p7v3lyv
session id  109
No active session found. Fetching the last session.
client data {
  name: 'Nasir android',
  client_id: 'm37p7v3lyv',
  email: 'nacirzia@gmail.com',
  phone: '6014635923',
  notes: null,
  tags: null
}
visitor data { ip: '154.198.113.225' }
visitor ip 154.198.113.225
No active visitor session found. Fetching the last session.
join_time of last session:  2024-11-09T15:47:51.000Z
left_time of last session:  2024-11-09T15:49:04.000Z
Visitor metadata: {
  os: 'Android',
  ip: '154.198.107.208',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Islamabad',
  created_at: 2024-11-09T15:47:52.000Z,
  left_time: 2024-11-09T15:49:04.000Z
}
Total visitor sessions: 4
Total chat sessions: 4
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37qf3owkc
No active session found. Fetching the last session.
client data {
  name: 'Hasnain phone',
  client_id: 'm37qf3owkc',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '154.198.123.30' }
visitor ip 154.198.123.30
fetching urls for history...
client id m37qf3owkc
session id  107
fetching urls for history...
client id m37qf3owkc
session id  107
No active visitor session found. Fetching the last session.
join_time of last session:  2024-11-09T12:51:43.000Z
left_time of last session:  2024-11-09T12:53:35.000Z
Visitor metadata: {
  os: 'Android',
  ip: '154.198.123.30',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Islamabad',
  created_at: 2024-11-09T12:51:47.000Z,
  left_time: 2024-11-09T12:53:35.000Z
}
Total visitor sessions: 9
Total chat sessions: 6
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
jennifer.conner@chatknot.com
a6muuaii
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 60
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv': { participants: Set(0) {}, messages: [] }
}
No active visitor session found. Fetching the last session.
join_time of last session:  2024-11-08T18:52:20.000Z
left_time of last session:  2024-11-08T18:52:57.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '103.196.163.26',
  country: 'Pakistan',
  browser: 'undefined undefined',
  city: 'Karachi',
  created_at: 2024-11-08T18:52:24.000Z,
  left_time: 2024-11-08T18:52:57.000Z
}
Total visitor sessions: 4
Total chat sessions: 2
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw
No active session found. Fetching the last session.
client data {
  name: null,
  client_id: 'm37blee5iw',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '103.196.163.26' }
visitor ip 103.196.163.26
last message id null
is old chat false
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw.
Admin 60 disconnected
Client connected: m37p7v3lyv
Client connected
public key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
chatKey: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37p7v3lyv
New visitor session created for client m37p7v3lyv
visotor is here
query have been done []  now move  null
No active visitor session found. Creating a new session...
visitor status change {
  client_id: 'm37p7v3lyv',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  status: 1
}
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
1 status
Notification to client m37p7v3lyv: visitor chat status changed
admins is fetched
Admin 61 notified of visitor m37p7v3lyv status change.
Visitor session status set to 3 for client m37p7v3lyv
new client {
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  widgetId: 'd8c0c514-532f-4060-b105-151163499422-1731001762249',
  domain: 'swanbookpublishers.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Android',
  url: 'https://swanbookpublishers.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm37p7v3lyv',
  joinTime: '11/11/2024, 15:38:26'
}
Received visitor URL update: {
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  widgetId: 'd8c0c514-532f-4060-b105-151163499422-1731001762249',
  domain: 'swanbookpublishers.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Android',
  url: 'https://swanbookpublishers.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm37p7v3lyv',
  joinTime: '11/11/2024, 15:38:26'
}
No active visitor session found. Creating a new session...
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'visitor url update' and data: {
  url: 'https://swanbookpublishers.com/',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  clientId: 'm37p7v3lyv'
}
{ user_id: 62 }
reset inactivity ...
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
{
  inactivityTimeout: null,
  disconnectTimeout: null,
  statusTimeout: 1,
  lastStatus: 1,
  isConnected: true,
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082'
}
Public key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
New visitor session created: {
  sessionResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 117,
    info: '',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 0
  },
  visitorUpdateResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 0,
    info: 'Rows matched: 1  Changed: 1  Warnings: 0',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 1
  }
}
Admin 61 notified of existing chat with client m37p7v3lyv from Pakistan (Karachi) on brand Swan Book Publishers
Using existing visitor session: 117
New chat session created by visitor: 82
Handling message for session: 82
Visitor added as participant in session 82
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37p7v3lyv
chatKey
Visitor sent message to chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37p7v3lyv: Hi
m37p7v3lyv
Number of valid numeric participants: []
All participants (including client IDs): [ 'm37p7v3lyv' ]
Admins fetched
notifyAllAdmins: true
No socket connection found for admin 60
Admin 61 notified with event 'New message blink', participant: true
No socket connection found for admin 62
Active session exists for client: m37p7v3lyv
Handling message for session: 82
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37p7v3lyv
chatKey
Visitor sent message to chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37p7v3lyv: Test
m37p7v3lyv
Number of valid numeric participants: []
All participants (including client IDs): [ 'm37p7v3lyv' ]
Admins fetched
notifyAllAdmins: true
No socket connection found for admin 60
Admin 61 notified with event 'New message blink', participant: true
No socket connection found for admin 62
melissa.richards@chatknot.com
zoSDnrTc
Active session exists for client: m37p7v3lyv
Handling message for session: 82
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37p7v3lyv
chatKey
Visitor sent message to chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37p7v3lyv: Hello
m37p7v3lyv
Number of valid numeric participants: []
All participants (including client IDs): [ 'm37p7v3lyv' ]
Admins fetched
notifyAllAdmins: true
No socket connection found for admin 60
Admin 61 notified with event 'New message blink', participant: true
No socket connection found for admin 62
62
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Client m37p7v3lyv disconnected
Status timeout already running for client m37p7v3lyv.
Client m37akwmjnv disconnected
Status timeout already running for client m37akwmjnv.
melissa.richards@chatknot.com
zoSDnrTc
62
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Handling disconnection for: m37p7v3lyv bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
Inactivity timeout cleared for client m37p7v3lyv
Handled final disconnection for client m37p7v3lyv
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
4 status
Notification to client m37p7v3lyv: client disconnected
Visitor session status set to 4 for client m37p7v3lyv
Status updated to 4 after disconnection for client m37p7v3lyv
Chat session set to inactive for client m37p7v3lyv
admins is fetched
Admin 61 notified of visitor m37p7v3lyv status change.
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'client History updated' and data: {
  client_id: 'm37p7v3lyv',
  client_name: 'Nasir android',
  served_by: '',
  chat_session_id: 82,
  brand_name: 'Swan Book Publishers',
  landing_url: 'https://swanbookpublishers.com/',
  IP_Health: 1,
  created_at: 2024-11-11T10:38:25.000Z,
  ip: '119.73.97.82',
  visitor_session_id: 117,
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  os: 'Android',
  join_time: 2024-11-11T10:38:27.000Z,
  left_time: 2024-11-11T10:39:14.000Z
}
{ user_id: 62 }
62
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
62
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 62
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m37akwmjnv': { participants: Set(0) {}, messages: [] }
}
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 62 disconnected
Handling disconnection for: m37akwmjnv d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
Inactivity timeout cleared for client m37akwmjnv
Handled final disconnection for client m37akwmjnv
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
4 status
Notification to client m37akwmjnv: client disconnected
Visitor session status set to 4 for client m37akwmjnv
Status updated to 4 after disconnection for client m37akwmjnv
Chat session set to inactive for client m37akwmjnv
admins is fetched
Admins fetched
{ user_id: 51 }
{ user_id: 51 }
{ user_id: 53 }
{ user_id: 51 }
{ user_id: 53 }
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 60
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] }
}
No active visitor session found. Fetching the last session.
join_time of last session:  2024-11-08T18:52:20.000Z
left_time of last session:  2024-11-08T18:52:57.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '103.196.163.26',
  country: 'Pakistan',
  browser: 'undefined undefined',
  city: 'Karachi',
  created_at: 2024-11-08T18:52:24.000Z,
  left_time: 2024-11-08T18:52:57.000Z
}
Total visitor sessions: 4
Total chat sessions: 2
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw
No active session found. Fetching the last session.
client data {
  name: null,
  client_id: 'm37blee5iw',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '103.196.163.26' }
visitor ip 103.196.163.26
last message id null
is old chat false
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 60 disconnected
Admin connected: 60
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] }
}
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw
No active session found. Fetching the last session.
No active visitor session found. Fetching the last session.
client data {
  name: null,
  client_id: 'm37blee5iw',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
join_time of last session:  2024-11-08T18:52:20.000Z
left_time of last session:  2024-11-08T18:52:57.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '103.196.163.26',
  country: 'Pakistan',
  browser: 'undefined undefined',
  city: 'Karachi',
  created_at: 2024-11-08T18:52:24.000Z,
  left_time: 2024-11-08T18:52:57.000Z
}
visitor data { ip: '103.196.163.26' }
visitor ip 103.196.163.26
Total visitor sessions: 4
Total chat sessions: 2
last message id null
is old chat false
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 60 disconnected
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 60
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] }
}
No active visitor session found. Fetching the last session.
join_time of last session:  2024-11-08T18:52:20.000Z
left_time of last session:  2024-11-08T18:52:57.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '103.196.163.26',
  country: 'Pakistan',
  browser: 'undefined undefined',
  city: 'Karachi',
  created_at: 2024-11-08T18:52:24.000Z,
  left_time: 2024-11-08T18:52:57.000Z
}
Total visitor sessions: 4
Total chat sessions: 2
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw
No active session found. Fetching the last session.
client data {
  name: null,
  client_id: 'm37blee5iw',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '103.196.163.26' }
visitor ip 103.196.163.26
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
last message id null
is old chat false
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw.
Admin 60 disconnected
62
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 62
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] }
}
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{
  name: null,
  client_id: 'm39hqiy9ez',
  online: '2024-11-09T01:32:23.000Z',
  servedBy: null,
  viewing: 'https://www.swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '6:32 AM',
  visitorStatus: 2,
  visitor_session_id: 104,
  os: null,
  ip: null,
  country: null,
  browser: null,
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[]
Successfully updated visitor session with chat_session_id: 83
No rating found for session 83
Client with ID m39hqiy9ez is not connected.
[ { user_id: 60 }, { user_id: 61 }, { user_id: 62 } ]
Admin 61 notified of visitor undefined served by update.
Admin 62 notified of visitor undefined served by update.
new session served by emitted
Admin 62 joined chat with client m39hqiy9ez
chat message emit for comment
Chat session updated as joined: 1
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez.
join_time of active session:  2024-11-09T01:32:18.000Z
Error fetching client metadata: Error: Error fetching visitor metadata: No metadata found for the provided client_id and join_time.
    at Object.getVisitorMetadata (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/models/ClientModel.js:283:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async fetchClientMetadata (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/controllers/ClientController.js:172:24)
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez
No active session found. Fetching the last session.
client data null
last message id null
is old chat false
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez
No active session found. Fetching the last session.
client data null
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez.
{
  name: null,
  client_id: 'm3cw0vdzqw',
  online: '2024-11-11T10:35:40.000Z',
  servedBy: null,
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:35 PM',
  visitorStatus: 1,
  visitor_session_id: 116,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[]
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Successfully updated visitor session with chat_session_id: 84
No rating found for session 84
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
[ { user_id: 60 }, { user_id: 61 }, { user_id: 62 } ]
Admin 61 notified of visitor undefined served by update.
Admin 62 notified of visitor undefined served by update.
new session served by emitted
Admin 62 joined chat with client m3cw0vdzqw
chat message emit for comment
Chat session updated as joined: 1
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw.
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
client data {
  name: null,
  client_id: 'm3cw0vdzqw',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
join_time of active session:  2024-11-11T10:35:35.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:35:39.000Z,
  left_time: null
}
Total visitor sessions: 1
Total chat sessions: 1
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
client data {
  name: null,
  client_id: 'm3cw0vdzqw',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw.
admin left the chat from bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
{ participants: Set(1) { 62 }, messages: [] }
{ participants: Set(0) {}, messages: [] }
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{
  name: null,
  client_id: 'm3cw0vdzqw',
  online: '2024-11-11T10:35:40.000Z',
  servedBy: 'Melissa Richards',
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:35 PM',
  visitorStatus: 1,
  visitor_session_id: 116,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[
  {
    session_id: 84,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw0vdzqw',
    visitor_id: 116,
    chat_initiated_time: 2024-11-11T10:40:41.000Z,
    chat_start_time: 2024-11-11T10:40:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:40:41.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 84,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw0vdzqw',
    visitor_id: 116,
    chat_initiated_time: 2024-11-11T10:40:41.000Z,
    chat_start_time: 2024-11-11T10:40:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:40:41.000Z,
    tags: null,
    notes: null
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
Active session exists for client: m3cw0vdzqw
Admin 62 joined chat with client m3cw0vdzqw
No rating found for session 84
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
join_time of active session:  2024-11-11T10:35:35.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:35:39.000Z,
  left_time: null
}
Total visitor sessions: 1
Total chat sessions: 1
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
client data {
  name: null,
  client_id: 'm3cw0vdzqw',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw.
admin left the chat from bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
{ participants: Set(1) { 62 }, messages: [] }
{ participants: Set(0) {}, messages: [] }
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Client connected: m37btv8az1
Client connected
public key 4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163
chatKey: 4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163_m37btv8az1
New visitor session created for client m37btv8az1
visotor is here
query have been done []  now move  null
No active visitor session found. Creating a new session...
visitor status change {
  client_id: 'm37btv8az1',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  status: 1
}
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
1 status
Notification to client m37btv8az1: visitor chat status changed
admins is fetched
Admin 61 notified of visitor m37btv8az1 status change.
Admin 62 notified of visitor m37btv8az1 status change.
Visitor session status set to 3 for client m37btv8az1
new client {
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  widgetId: 'd8c0c514-532f-4060-b105-151163499422-1731001762249',
  domain: 'swanbookpublishers.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Windows',
  url: 'https://swanbookpublishers.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm37btv8az1',
  joinTime: '11/11/2024, 3:41:36 PM'
}
Received visitor URL update: {
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  widgetId: 'd8c0c514-532f-4060-b105-151163499422-1731001762249',
  domain: 'swanbookpublishers.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Windows',
  url: 'https://swanbookpublishers.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm37btv8az1',
  joinTime: '11/11/2024, 3:41:36 PM'
}
No active visitor session found. Creating a new session...
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'visitor url update' and data: {
  url: 'https://swanbookpublishers.com/',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  clientId: 'm37btv8az1'
}
{ user_id: 62 }
Admin 62 notified with event 'visitor url update' and data: {
  url: 'https://swanbookpublishers.com/',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  clientId: 'm37btv8az1'
}
reset inactivity ...
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
{
  inactivityTimeout: null,
  disconnectTimeout: null,
  statusTimeout: 1,
  lastStatus: 1,
  isConnected: true,
  public_key: '4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163'
}
Public key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
New visitor session created: {
  sessionResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 118,
    info: '',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 0
  },
  visitorUpdateResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 0,
    info: 'Rows matched: 1  Changed: 1  Warnings: 0',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 1
  }
}
Admin 61 notified of existing chat with client m37btv8az1 from Pakistan (Karachi) on brand Swan Book Publishers
Admin 62 notified of existing chat with client m37btv8az1 from Pakistan (Karachi) on brand Swan Book Publishers
Inactivity timeout triggered for client: m36jho45bm
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
2 status
Notification to client m36jho45bm: visitor is idle
Status updated to 2 due to inactivity for client m36jho45bm
admins is fetched
Client connected: m3cw9f6a4l
Client connected
public key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
chatKey: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
New visitor session created for client m3cw9f6a4l
visotor is here
query have been done []  now move  null
No active visitor session found. Creating a new session...
Client connected: m37bsj23tf
Client connected
public key 4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163
chatKey: 4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163_m37bsj23tf
New visitor session created for client m37bsj23tf
visotor is here
query have been done []  now move  null
No active visitor session found. Creating a new session...
visitor status change {
  client_id: 'm3cw9f6a4l',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  status: 1
}
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
1 status
Notification to client m3cw9f6a4l: visitor chat status changed
admins is fetched
Admin 61 notified of visitor m3cw9f6a4l status change.
Admin 62 notified of visitor m3cw9f6a4l status change.
Visitor session status set to 3 for client m3cw9f6a4l
new client {
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  widgetId: 'd8c0c514-532f-4060-b105-151163499422-1731001762249',
  domain: 'swanbookpublishers.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Windows',
  url: 'https://swanbookpublishers.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm3cw9f6a4l',
  joinTime: '11/11/2024, 15:42:20'
}
Received visitor URL update: {
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  widgetId: 'd8c0c514-532f-4060-b105-151163499422-1731001762249',
  domain: 'swanbookpublishers.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Windows',
  url: 'https://swanbookpublishers.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm3cw9f6a4l',
  joinTime: '11/11/2024, 15:42:20'
}
No active visitor session found. Creating a new session...
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'visitor url update' and data: {
  url: 'https://swanbookpublishers.com/',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  clientId: 'm3cw9f6a4l'
}
{ user_id: 62 }
Admin 62 notified with event 'visitor url update' and data: {
  url: 'https://swanbookpublishers.com/',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  clientId: 'm3cw9f6a4l'
}
reset inactivity ...
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
{
  inactivityTimeout: null,
  disconnectTimeout: null,
  statusTimeout: 1,
  lastStatus: 1,
  isConnected: true,
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082'
}
Public key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
New visitor session created: {
  sessionResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 119,
    info: '',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 0
  },
  visitorUpdateResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 0,
    info: 'Rows matched: 1  Changed: 1  Warnings: 0',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 1
  }
}
Admin 61 notified of existing chat with client m3cw9f6a4l from Pakistan (Karachi) on brand Swan Book Publishers
Admin 62 notified of existing chat with client m3cw9f6a4l from Pakistan (Karachi) on brand Swan Book Publishers
new client {
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  widgetId: 'd8c0c514-532f-4060-b105-151163499422-1731001762249',
  domain: 'swanbookpublishers.com',
  browser: { name: 'Google Chrome', version: '116' },
  os: 'MacOS',
  url: 'https://swanbookpublishers.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm37bsj23tf',
  joinTime: '11/11/2024, 15:42:20'
}
Received visitor URL update: {
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  widgetId: 'd8c0c514-532f-4060-b105-151163499422-1731001762249',
  domain: 'swanbookpublishers.com',
  browser: { name: 'Google Chrome', version: '116' },
  os: 'MacOS',
  url: 'https://swanbookpublishers.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm37bsj23tf',
  joinTime: '11/11/2024, 15:42:20'
}
No active visitor session found. Creating a new session...
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'visitor url update' and data: {
  url: 'https://swanbookpublishers.com/',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  clientId: 'm37bsj23tf'
}
{ user_id: 62 }
Admin 62 notified with event 'visitor url update' and data: {
  url: 'https://swanbookpublishers.com/',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  clientId: 'm37bsj23tf'
}
reset inactivity ...
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
{
  inactivityTimeout: null,
  disconnectTimeout: null,
  statusTimeout: null,
  lastStatus: 1,
  isConnected: true,
  public_key: '4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163'
}
Public key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
New visitor session created: {
  sessionResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 120,
    info: '',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 0
  },
  visitorUpdateResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 0,
    info: 'Rows matched: 1  Changed: 1  Warnings: 0',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 1
  }
}
Admin 61 notified of existing chat with client m37bsj23tf from Pakistan (Karachi) on brand Swan Book Publishers
Admin 62 notified of existing chat with client m37bsj23tf from Pakistan (Karachi) on brand Swan Book Publishers
visitor status change {
  client_id: 'm37bsj23tf',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  status: 1
}
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
1 status
Notification to client m37bsj23tf: visitor chat status changed
admins is fetched
Admin 61 notified of visitor m37bsj23tf status change.
Admin 62 notified of visitor m37bsj23tf status change.
Visitor session status set to 3 for client m37bsj23tf
Admin 62 disconnected
62
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 62
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw': { participants: Set(0) {}, messages: [] }
}
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{
  name: null,
  client_id: 'm37bsj23tf',
  online: '2024-11-11T10:42:21.000Z',
  servedBy: null,
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:42 PM',
  visitorStatus: 1,
  visitor_session_id: 120,
  os: 'MacOS',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 116',
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[]
Successfully updated visitor session with chat_session_id: 85
No rating found for session 85
[ { user_id: 60 }, { user_id: 61 }, { user_id: 62 } ]
Admin 61 notified of visitor undefined served by update.
Admin 62 notified of visitor undefined served by update.
new session served by emitted
Admin 62 joined chat with client m37bsj23tf
chat message emit for comment
join_time of active session:  2024-11-11T10:42:16.000Z
Visitor metadata: {
  os: 'MacOS',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 116',
  city: 'Karachi',
  created_at: 2024-11-11T10:42:20.000Z,
  left_time: null
}
Total visitor sessions: 4
Total chat sessions: 4
Chat session updated as joined: 3
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
client data {
  name: null,
  client_id: 'm37bsj23tf',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
client data {
  name: null,
  client_id: 'm37bsj23tf',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
Participant already exists.
activeChats....
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf': { participants: Set(1) { 62 }, messages: [] }
}
Active session exists for client: m37bsj23tf
session id =  85
Admin 62 sent message to chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf: hi
[]
admin left the chat from bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
{ participants: Set(1) { 62 }, messages: [] }
{ participants: Set(0) {}, messages: [] }
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{
  name: null,
  client_id: 'm37bsj23tf',
  online: '2024-11-11T10:42:21.000Z',
  servedBy: 'Melissa Richards',
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:42 PM',
  visitorStatus: 1,
  visitor_session_id: 120,
  os: 'MacOS',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 116',
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[
  {
    session_id: 85,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm37bsj23tf',
    visitor_id: 120,
    chat_initiated_time: 2024-11-11T10:42:41.000Z,
    chat_start_time: 2024-11-11T10:42:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:42:41.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 85,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm37bsj23tf',
    visitor_id: 120,
    chat_initiated_time: 2024-11-11T10:42:41.000Z,
    chat_start_time: 2024-11-11T10:42:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:42:41.000Z,
    tags: null,
    notes: null
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
Active session exists for client: m37bsj23tf
Admin 62 joined chat with client m37bsj23tf
No rating found for session 85
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
join_time of active session:  2024-11-11T10:42:16.000Z
Visitor metadata: {
  os: 'MacOS',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 116',
  city: 'Karachi',
  created_at: 2024-11-11T10:42:20.000Z,
  left_time: null
}
Total visitor sessions: 4
Total chat sessions: 4
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
client data {
  name: null,
  client_id: 'm37bsj23tf',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
admin left the chat from bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
{ participants: Set(1) { 62 }, messages: [] }
{ participants: Set(0) {}, messages: [] }
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{
  name: null,
  client_id: 'm3cw9f6a4l',
  online: '2024-11-11T10:42:20.000Z',
  servedBy: null,
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:42 PM',
  visitorStatus: 1,
  visitor_session_id: 119,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[]
Successfully updated visitor session with chat_session_id: 86
No rating found for session 86
[ { user_id: 60 }, { user_id: 61 }, { user_id: 62 } ]
Admin 61 notified of visitor undefined served by update.
Admin 62 notified of visitor undefined served by update.
new session served by emitted
Admin 62 joined chat with client m3cw9f6a4l
chat message emit for comment
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Chat session updated as joined: 1
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l.
join_time of active session:  2024-11-11T10:42:15.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:42:19.000Z,
  left_time: null
}
Total visitor sessions: 1
Total chat sessions: 1
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
client data {
  name: null,
  client_id: 'm3cw9f6a4l',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
client data {
  name: null,
  client_id: 'm3cw9f6a4l',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l.
{
  name: 'Hasnain',
  client_id: 'm37btv8az1',
  online: '2024-11-11T10:41:37.000Z',
  servedBy: null,
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:41 PM',
  visitorStatus: 1,
  visitor_session_id: 118,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[]
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
No active session found. Fetching the last session.
last message id null
is old chat false
client data {
  name: 'Hasnain',
  client_id: 'm37btv8az1',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1.
join_time of active session:  2024-11-11T10:41:32.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:41:37.000Z,
  left_time: null
}
Total visitor sessions: 16
Total chat sessions: 11
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
Successfully updated visitor session with chat_session_id: 87
No rating found for session 87
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
[ { user_id: 60 }, { user_id: 61 }, { user_id: 62 } ]
Admin 61 notified of visitor undefined served by update.
Admin 62 notified of visitor undefined served by update.
new session served by emitted
Admin 62 joined chat with client m37btv8az1
chat message emit for comment
Chat session updated as joined: 5
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
client data {
  name: 'Hasnain',
  client_id: 'm37btv8az1',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1.
{
  name: null,
  client_id: 'm3cw9f6a4l',
  online: '2024-11-11T10:42:20.000Z',
  servedBy: 'Melissa Richards',
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:42 PM',
  visitorStatus: 1,
  visitor_session_id: 119,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[
  {
    session_id: 86,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw9f6a4l',
    visitor_id: 119,
    chat_initiated_time: 2024-11-11T10:43:01.000Z,
    chat_start_time: 2024-11-11T10:43:01.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:43:01.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 86,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw9f6a4l',
    visitor_id: 119,
    chat_initiated_time: 2024-11-11T10:43:01.000Z,
    chat_start_time: 2024-11-11T10:43:01.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:43:01.000Z,
    tags: null,
    notes: null
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
Active session exists for client: m3cw9f6a4l
Admin 62 joined chat with client m3cw9f6a4l
No rating found for session 86
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
join_time of active session:  2024-11-11T10:42:15.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:42:19.000Z,
  left_time: null
}
Total visitor sessions: 1
Total chat sessions: 1
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
client data {
  name: null,
  client_id: 'm3cw9f6a4l',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l.
{
  name: null,
  client_id: 'm37bsj23tf',
  online: '2024-11-11T10:42:21.000Z',
  servedBy: 'Melissa Richards',
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:42 PM',
  visitorStatus: 1,
  visitor_session_id: 120,
  os: 'MacOS',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 116',
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[
  {
    session_id: 85,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm37bsj23tf',
    visitor_id: 120,
    chat_initiated_time: 2024-11-11T10:42:41.000Z,
    chat_start_time: 2024-11-11T10:42:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:42:41.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 85,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm37bsj23tf',
    visitor_id: 120,
    chat_initiated_time: 2024-11-11T10:42:41.000Z,
    chat_start_time: 2024-11-11T10:42:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:42:41.000Z,
    tags: null,
    notes: null
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
Active session exists for client: m37bsj23tf
Admin 62 joined chat with client m37bsj23tf
No rating found for session 85
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
client data {
  name: null,
  client_id: 'm37bsj23tf',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
last message id null
is old chat false
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
join_time of active session:  2024-11-11T10:42:16.000Z
Visitor metadata: {
  os: 'MacOS',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 116',
  city: 'Karachi',
  created_at: 2024-11-11T10:42:20.000Z,
  left_time: null
}
Total visitor sessions: 4
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Total chat sessions: 4
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 62 disconnected
62
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 62
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1': { participants: Set(0) {}, messages: [] }
}
join_time of active session:  2024-11-11T10:42:16.000Z
Visitor metadata: {
  os: 'MacOS',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 116',
  city: 'Karachi',
  created_at: 2024-11-11T10:42:20.000Z,
  left_time: null
}
Total visitor sessions: 4
Total chat sessions: 4
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
client data {
  name: null,
  client_id: 'm37bsj23tf',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
last message id 514
is old chat true
chat key
last message id 514
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
last message id 1
is old chat true
chat key
last message id 1
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
last message id 1
is old chat true
chat key
last message id 1
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
{
  name: null,
  client_id: 'm3cw9f6a4l',
  online: '2024-11-11T10:42:20.000Z',
  servedBy: 'Melissa Richards',
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:42 PM',
  visitorStatus: 1,
  visitor_session_id: 119,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[
  {
    session_id: 86,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw9f6a4l',
    visitor_id: 119,
    chat_initiated_time: 2024-11-11T10:43:01.000Z,
    chat_start_time: 2024-11-11T10:43:01.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:43:01.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 86,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw9f6a4l',
    visitor_id: 119,
    chat_initiated_time: 2024-11-11T10:43:01.000Z,
    chat_start_time: 2024-11-11T10:43:01.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:43:01.000Z,
    tags: null,
    notes: null
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
Active session exists for client: m3cw9f6a4l
Admin 62 joined chat with client m3cw9f6a4l
No rating found for session 86
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l.
join_time of active session:  2024-11-11T10:42:15.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:42:19.000Z,
  left_time: null
}
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
Total visitor sessions: 1
Total chat sessions: 1
client data {
  name: null,
  client_id: 'm3cw9f6a4l',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
admin left the chat from bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
{ participants: Set(1) { 62 }, messages: [] }
{ participants: Set(0) {}, messages: [] }
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{
  name: null,
  client_id: 'm3cw9f6a4l',
  online: '2024-11-11T10:42:20.000Z',
  servedBy: 'Melissa Richards',
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:42 PM',
  visitorStatus: 1,
  visitor_session_id: 119,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[
  {
    session_id: 86,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw9f6a4l',
    visitor_id: 119,
    chat_initiated_time: 2024-11-11T10:43:01.000Z,
    chat_start_time: 2024-11-11T10:43:01.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:43:01.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 86,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw9f6a4l',
    visitor_id: 119,
    chat_initiated_time: 2024-11-11T10:43:01.000Z,
    chat_start_time: 2024-11-11T10:43:01.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:43:01.000Z,
    tags: null,
    notes: null
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
Active session exists for client: m3cw9f6a4l
Admin 62 joined chat with client m3cw9f6a4l
No rating found for session 86
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
client data {
  name: null,
  client_id: 'm3cw9f6a4l',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
join_time of active session:  2024-11-11T10:42:15.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:42:19.000Z,
  left_time: null
}
Total visitor sessions: 1
Total chat sessions: 1
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
last message id null
is old chat false
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l.
last message id 516
is old chat true
chat key
{
  name: null,
  client_id: 'm37bsj23tf',
  online: '2024-11-11T10:42:21.000Z',
  servedBy: 'Melissa Richards',
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:42 PM',
  visitorStatus: 1,
  visitor_session_id: 120,
  os: 'MacOS',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 116',
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[
  {
    session_id: 85,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm37bsj23tf',
    visitor_id: 120,
    chat_initiated_time: 2024-11-11T10:42:41.000Z,
    chat_start_time: 2024-11-11T10:42:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:42:41.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 85,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm37bsj23tf',
    visitor_id: 120,
    chat_initiated_time: 2024-11-11T10:42:41.000Z,
    chat_start_time: 2024-11-11T10:42:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:42:41.000Z,
    tags: null,
    notes: null
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
Active session exists for client: m37bsj23tf
Admin 62 joined chat with client m37bsj23tf
No rating found for session 85
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
last message id null
is old chat false
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
join_time of active session:  2024-11-11T10:42:16.000Z
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
Visitor metadata: {
  os: 'MacOS',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 116',
  city: 'Karachi',
  created_at: 2024-11-11T10:42:20.000Z,
  left_time: null
}
client data {
  name: null,
  client_id: 'm37bsj23tf',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
Total visitor sessions: 4
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
Total chat sessions: 4
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
last message id 514
is old chat true
chat key
last message id 514
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
last message id 1
is old chat true
chat key
last message id 1
submit rating {
  client_id: 'm3cw0vdzqw',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  rating: 1
}
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'rating submit by client' and data: {
  client_id: 'm3cw0vdzqw',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  rating: 1
}
{ user_id: 62 }
Admin 62 notified with event 'rating submit by client' and data: {
  client_id: 'm3cw0vdzqw',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  rating: 1
}
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
{
  name: null,
  client_id: 'm3cw0vdzqw',
  online: '2024-11-11T10:35:40.000Z',
  servedBy: 'Melissa Richards',
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:35 PM',
  visitorStatus: 1,
  visitor_session_id: 116,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[
  {
    session_id: 84,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw0vdzqw',
    visitor_id: 116,
    chat_initiated_time: 2024-11-11T10:40:41.000Z,
    chat_start_time: 2024-11-11T10:40:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:40:41.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 84,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw0vdzqw',
    visitor_id: 116,
    chat_initiated_time: 2024-11-11T10:40:41.000Z,
    chat_start_time: 2024-11-11T10:40:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:40:41.000Z,
    tags: null,
    notes: null
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
Active session exists for client: m3cw0vdzqw
Admin 62 joined chat with client m3cw0vdzqw
Rating emitted for session 84: 1
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw.
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
client data {
  name: null,
  client_id: 'm3cw0vdzqw',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
join_time of active session:  2024-11-11T10:35:35.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:35:39.000Z,
  left_time: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
Total visitor sessions: 1
Total chat sessions: 1
last message id null
is old chat false
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw.
last message id 513
is old chat true
chat key
{
  name: null,
  client_id: 'm39hqiy9ez',
  online: '2024-11-09T01:32:23.000Z',
  servedBy: 'Melissa Richards',
  viewing: 'https://www.swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '6:32 AM',
  visitorStatus: 2,
  visitor_session_id: 104,
  os: null,
  ip: null,
  country: null,
  browser: null,
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[
  {
    session_id: 83,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm39hqiy9ez',
    visitor_id: 104,
    chat_initiated_time: 2024-11-11T10:40:38.000Z,
    chat_start_time: 2024-11-11T10:40:38.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:40:38.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 83,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm39hqiy9ez',
    visitor_id: 104,
    chat_initiated_time: 2024-11-11T10:40:38.000Z,
    chat_start_time: 2024-11-11T10:40:38.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:40:38.000Z,
    tags: null,
    notes: null
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez
Active session exists for client: m39hqiy9ez
Admin 62 joined chat with client m39hqiy9ez
No rating found for session 83
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez
No active session found. Fetching the last session.
client data null
last message id null
is old chat false
join_time of active session:  2024-11-09T01:32:18.000Z
Error fetching client metadata: Error: Error fetching visitor metadata: No metadata found for the provided client_id and join_time.
    at Object.getVisitorMetadata (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/models/ClientModel.js:283:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async fetchClientMetadata (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/controllers/ClientController.js:172:24)
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez.
{
  name: null,
  client_id: 'm3cw0vdzqw',
  online: '2024-11-11T10:35:40.000Z',
  servedBy: 'Melissa Richards',
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:35 PM',
  visitorStatus: 1,
  visitor_session_id: 116,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[
  {
    session_id: 84,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw0vdzqw',
    visitor_id: 116,
    chat_initiated_time: 2024-11-11T10:40:41.000Z,
    chat_start_time: 2024-11-11T10:40:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:40:41.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 84,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw0vdzqw',
    visitor_id: 116,
    chat_initiated_time: 2024-11-11T10:40:41.000Z,
    chat_start_time: 2024-11-11T10:40:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:40:41.000Z,
    tags: null,
    notes: null
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
Active session exists for client: m3cw0vdzqw
Admin 62 joined chat with client m3cw0vdzqw
Rating emitted for session 84: 1
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
join_time of active session:  2024-11-11T10:35:35.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:35:39.000Z,
  left_time: null
}
Total visitor sessions: 1
Total chat sessions: 1
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
client data {
  name: null,
  client_id: 'm3cw0vdzqw',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
last message id null
is old chat false
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw.
last message id 513
is old chat true
chat key
{
  name: 'Hasnain',
  client_id: 'm37btv8az1',
  online: '2024-11-11T10:41:37.000Z',
  servedBy: 'Melissa Richards',
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:41 PM',
  visitorStatus: 1,
  visitor_session_id: 118,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[
  {
    session_id: 87,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm37btv8az1',
    visitor_id: 118,
    chat_initiated_time: 2024-11-11T10:43:04.000Z,
    chat_start_time: 2024-11-11T10:43:04.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:43:04.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 87,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm37btv8az1',
    visitor_id: 118,
    chat_initiated_time: 2024-11-11T10:43:04.000Z,
    chat_start_time: 2024-11-11T10:43:04.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:43:04.000Z,
    tags: null,
    notes: null
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
Active session exists for client: m37btv8az1
Admin 62 joined chat with client m37btv8az1
No rating found for session 87
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
join_time of active session:  2024-11-11T10:41:32.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:41:37.000Z,
  left_time: null
}
Total visitor sessions: 16
Total chat sessions: 11
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
client data {
  name: 'Hasnain',
  client_id: 'm37btv8az1',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1.
last message id 517
is old chat true
chat key
last message id 517
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1.
last message id 183
is old chat true
chat key
last message id 183
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
last message id 109
is old chat true
chat key
last message id 109
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
last message id 54
is old chat true
chat key
last message id 54
{
  name: null,
  client_id: 'm3cw9f6a4l',
  online: '2024-11-11T10:42:20.000Z',
  servedBy: 'Melissa Richards',
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:42 PM',
  visitorStatus: 1,
  visitor_session_id: 119,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[
  {
    session_id: 86,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw9f6a4l',
    visitor_id: 119,
    chat_initiated_time: 2024-11-11T10:43:01.000Z,
    chat_start_time: 2024-11-11T10:43:01.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:43:01.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 86,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw9f6a4l',
    visitor_id: 119,
    chat_initiated_time: 2024-11-11T10:43:01.000Z,
    chat_start_time: 2024-11-11T10:43:01.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:43:01.000Z,
    tags: null,
    notes: null
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
Active session exists for client: m3cw9f6a4l
Admin 62 joined chat with client m3cw9f6a4l
No rating found for session 86
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l.
join_time of active session:  2024-11-11T10:42:15.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:42:19.000Z,
  left_time: null
}
Total visitor sessions: 1
Total chat sessions: 1
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
client data {
  name: null,
  client_id: 'm3cw9f6a4l',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l.
Inactivity timeout triggered for client: m36ki0nzz7
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
2 status
Notification to client m36ki0nzz7: visitor is idle
Status updated to 2 due to inactivity for client m36ki0nzz7
admins is fetched
{
  name: null,
  client_id: 'm37bsj23tf',
  online: '2024-11-11T10:42:21.000Z',
  servedBy: 'Melissa Richards',
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:42 PM',
  visitorStatus: 1,
  visitor_session_id: 120,
  os: 'MacOS',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 116',
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[
  {
    session_id: 85,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm37bsj23tf',
    visitor_id: 120,
    chat_initiated_time: 2024-11-11T10:42:41.000Z,
    chat_start_time: 2024-11-11T10:42:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:42:41.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 85,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm37bsj23tf',
    visitor_id: 120,
    chat_initiated_time: 2024-11-11T10:42:41.000Z,
    chat_start_time: 2024-11-11T10:42:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:42:41.000Z,
    tags: null,
    notes: null
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
Active session exists for client: m37bsj23tf
Admin 62 joined chat with client m37bsj23tf
No rating found for session 85
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
client data {
  name: null,
  client_id: 'm37bsj23tf',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
join_time of active session:  2024-11-11T10:42:16.000Z
Visitor metadata: {
  os: 'MacOS',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 116',
  city: 'Karachi',
  created_at: 2024-11-11T10:42:20.000Z,
  left_time: null
}
Total visitor sessions: 4
Total chat sessions: 4
last message id 514
is old chat true
chat key
last message id 514
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
all chats fetched.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
last message id 1
is old chat true
chat key
last message id 1
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf.
No active visitor session found. Fetching the last session.
join_time of last session:  2024-11-08T19:24:43.000Z
left_time of last session:  2024-11-08T19:27:07.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '70.88.153.189',
  country: 'United States',
  browser: 'Microsoft Edge 130',
  city: 'Windsor Mill',
  created_at: 2024-11-08T19:24:47.000Z,
  left_time: 2024-11-08T19:27:07.000Z
}
Total visitor sessions: 1
Total chat sessions: 0
fetching urls for history...
client id m394lsnqhu
session id  95
fetching urls for history...
client id m394lsnqhu
session id  95
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m394lsnqhu
No active session found. Fetching the last session.
client data null
No active visitor session found. Fetching the last session.
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3ajhav2i4
join_time of last session:  2024-11-09T19:08:57.000Z
left_time of last session:  2024-11-09T19:23:57.000Z
No active session found. Fetching the last session.
Visitor metadata: {
  os: 'Windows',
  ip: '43.246.224.131',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Unknown',
  created_at: 2024-11-09T19:09:00.000Z,
  left_time: 2024-11-09T19:23:57.000Z
}
fetching urls for history...
client id m3ajhav2i4
session id  110
fetching urls for history...
client id m3ajhav2i4
session id  110
client data null
Total visitor sessions: 1
Total chat sessions: 0
Active session exists for client: m3cw9f6a4l
Handling message for session: 86
Visitor added as participant in session 86
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
chatKey
Visitor sent message to chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l: hello
62,m3cw9f6a4l
Number of valid numeric participants: [ 62 ]
All participants (including client IDs): [ '62', 'm3cw9f6a4l' ]
Active session exists for client: m3cw9f6a4l
Handling message for session: 86
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
chatKey
Visitor sent message to chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l: how are you
62,m3cw9f6a4l
Number of valid numeric participants: [ 62 ]
All participants (including client IDs): [ '62', 'm3cw9f6a4l' ]
Client m37btv8az1 disconnected
Status timeout already running for client m37btv8az1.
Inactivity timeout triggered for client: m3cw0vdzqw
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
2 status
Notification to client m3cw0vdzqw: visitor is idle
Status updated to 2 due to inactivity for client m3cw0vdzqw
admins is fetched
Admin 61 notified of visitor m3cw0vdzqw status change.
Admin 62 notified of visitor m3cw0vdzqw status change.
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 60
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1': { participants: Set(1) { 62 }, messages: [] }
}
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
No active visitor session found. Fetching the last session.
join_time of last session:  2024-11-08T18:52:20.000Z
left_time of last session:  2024-11-08T18:52:57.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '103.196.163.26',
  country: 'Pakistan',
  browser: 'undefined undefined',
  city: 'Karachi',
  created_at: 2024-11-08T18:52:24.000Z,
  left_time: 2024-11-08T18:52:57.000Z
}
Total visitor sessions: 4
Total chat sessions: 2
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
No active session found. Fetching the last session.
client data {
  name: null,
  client_id: 'm37blee5iw',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '103.196.163.26' }
visitor ip 103.196.163.26
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
last message id null
is old chat false
Admin 60 disconnected
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 60
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1': { participants: Set(1) { 62 }, messages: [] }
}
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw
last message id null
is old chat false
No active session found. Fetching the last session.
client data {
  name: null,
  client_id: 'm37blee5iw',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
No active visitor session found. Fetching the last session.
join_time of last session:  2024-11-08T18:52:20.000Z
left_time of last session:  2024-11-08T18:52:57.000Z
visitor data { ip: '103.196.163.26' }
visitor ip 103.196.163.26
Visitor metadata: {
  os: 'Windows',
  ip: '103.196.163.26',
  country: 'Pakistan',
  browser: 'undefined undefined',
  city: 'Karachi',
  created_at: 2024-11-08T18:52:24.000Z,
  left_time: 2024-11-08T18:52:57.000Z
}
Total visitor sessions: 4
Total chat sessions: 2
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 60 disconnected
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 60
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1': { participants: Set(1) { 62 }, messages: [] }
}
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
No active visitor session found. Fetching the last session.
join_time of last session:  2024-11-08T18:52:20.000Z
left_time of last session:  2024-11-08T18:52:57.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '103.196.163.26',
  country: 'Pakistan',
  browser: 'undefined undefined',
  city: 'Karachi',
  created_at: 2024-11-08T18:52:24.000Z,
  left_time: 2024-11-08T18:52:57.000Z
}
Total visitor sessions: 4
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw
Total chat sessions: 2
No active session found. Fetching the last session.
client data {
  name: null,
  client_id: 'm37blee5iw',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '103.196.163.26' }
visitor ip 103.196.163.26
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
last message id null
is old chat false
Admin 60 disconnected
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 60
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1': { participants: Set(1) { 62 }, messages: [] }
}
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw
No active session found. Fetching the last session.
client data {
  name: null,
  client_id: 'm37blee5iw',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
No active visitor session found. Fetching the last session.
join_time of last session:  2024-11-08T18:52:20.000Z
left_time of last session:  2024-11-08T18:52:57.000Z
visitor data { ip: '103.196.163.26' }
visitor ip 103.196.163.26
Visitor metadata: {
  os: 'Windows',
  ip: '103.196.163.26',
  country: 'Pakistan',
  browser: 'undefined undefined',
  city: 'Karachi',
  created_at: 2024-11-08T18:52:24.000Z,
  left_time: 2024-11-08T18:52:57.000Z
}
last message id null
is old chat false
Total visitor sessions: 4
Total chat sessions: 2
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Handling disconnection for: m37btv8az1 bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
Inactivity timeout cleared for client m37btv8az1
Handled final disconnection for client m37btv8az1
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
4 status
Notification to client m37btv8az1: client disconnected
Visitor session status set to 4 for client m37btv8az1
Status updated to 4 after disconnection for client m37btv8az1
Chat session set to inactive for client m37btv8az1
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw.
admins is fetched
Admin 60 notified of visitor m37btv8az1 status change.
Admin 61 notified of visitor m37btv8az1 status change.
Admin 62 notified of visitor m37btv8az1 status change.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admins fetched
{ user_id: 60 }
Admin 60 notified with event 'client History updated' and data: {
  client_id: 'm37btv8az1',
  client_name: 'Hasnain',
  served_by: 'Melissa Richards',
  chat_session_id: 87,
  brand_name: 'Swan Book Publishers',
  landing_url: 'https://swanbookpublishers.com/',
  IP_Health: 1,
  created_at: 2024-11-11T10:41:37.000Z,
  ip: '119.73.97.82',
  visitor_session_id: 118,
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  os: 'Windows',
  join_time: 2024-11-11T10:41:37.000Z,
  left_time: 2024-11-11T10:46:09.000Z
}
{ user_id: 61 }
Admin 61 notified with event 'client History updated' and data: {
  client_id: 'm37btv8az1',
  client_name: 'Hasnain',
  served_by: 'Melissa Richards',
  chat_session_id: 87,
  brand_name: 'Swan Book Publishers',
  landing_url: 'https://swanbookpublishers.com/',
  IP_Health: 1,
  created_at: 2024-11-11T10:41:37.000Z,
  ip: '119.73.97.82',
  visitor_session_id: 118,
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  os: 'Windows',
  join_time: 2024-11-11T10:41:37.000Z,
  left_time: 2024-11-11T10:46:09.000Z
}
{ user_id: 62 }
Admin 62 notified with event 'client History updated' and data: {
  client_id: 'm37btv8az1',
  client_name: 'Hasnain',
  served_by: 'Melissa Richards',
  chat_session_id: 87,
  brand_name: 'Swan Book Publishers',
  landing_url: 'https://swanbookpublishers.com/',
  IP_Health: 1,
  created_at: 2024-11-11T10:41:37.000Z,
  ip: '119.73.97.82',
  visitor_session_id: 118,
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  os: 'Windows',
  join_time: 2024-11-11T10:41:37.000Z,
  left_time: 2024-11-11T10:46:09.000Z
}
Admin 60 disconnected
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 60
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l': { participants: Set(1) { 62 }, messages: [] }
}
No active visitor session found. Fetching the last session.
join_time of last session:  2024-11-08T18:52:20.000Z
left_time of last session:  2024-11-08T18:52:57.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '103.196.163.26',
  country: 'Pakistan',
  browser: 'undefined undefined',
  city: 'Karachi',
  created_at: 2024-11-08T18:52:24.000Z,
  left_time: 2024-11-08T18:52:57.000Z
}
Total visitor sessions: 4
Total chat sessions: 2
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
last message id null
is old chat false
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw
No active session found. Fetching the last session.
client data {
  name: null,
  client_id: 'm37blee5iw',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '103.196.163.26' }
visitor ip 103.196.163.26
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw.
Admin 60 disconnected
admin left the chat from bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf
{ participants: Set(1) { 62 }, messages: [] }
{ participants: Set(0) {}, messages: [] }
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{
  name: null,
  client_id: 'm3cw9f6a4l',
  online: '2024-11-11T10:42:20.000Z',
  servedBy: 'Melissa Richards',
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:42 PM',
  visitorStatus: 1,
  visitor_session_id: 119,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 2,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[
  {
    session_id: 86,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw9f6a4l',
    visitor_id: 119,
    chat_initiated_time: 2024-11-11T10:43:01.000Z,
    chat_start_time: 2024-11-11T10:43:01.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:43:01.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 86,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw9f6a4l',
    visitor_id: 119,
    chat_initiated_time: 2024-11-11T10:43:01.000Z,
    chat_start_time: 2024-11-11T10:43:01.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:43:01.000Z,
    tags: null,
    notes: null
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
Active session exists for client: m3cw9f6a4l
Admin 62 joined chat with client m3cw9f6a4l
No rating found for session 86
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
join_time of active session:  2024-11-11T10:42:15.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:42:19.000Z,
  left_time: null
}
Total visitor sessions: 1
Total chat sessions: 1
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
client data {
  name: null,
  client_id: 'm3cw9f6a4l',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
All unseen messages marked as seen for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l.
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'message_seen' and data: {
  client_id: 'm3cw9f6a4l',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  isSeen: 1
}
{ user_id: 62 }
Admin 62 notified with event 'message_seen' and data: {
  client_id: 'm3cw9f6a4l',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  isSeen: 1
}
Participant added.
62
[
  {
    participant_id: 156,
    session_id: 86,
    user_id: '62',
    role: 'admin',
    join_time: 2024-11-11T10:43:01.000Z
  }
]
Active session exists for client: 86
Admin 62 joined chat with client 86
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
activeChats....
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l': { participants: Set(1) { 62 }, messages: [] }
}
Active session exists for client: m3cw9f6a4l
session id =  86
Admin 62 sent message to chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l: i am doing great
[]
Active session exists for client: m3cw9f6a4l
Handling message for session: 86
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
chatKey
Visitor sent message to chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l: sdfgdfgfdgsdfgdfgsdfgdsfgdsfgdsfg
62,m3cw9f6a4l
Number of valid numeric participants: [ 62 ]
All participants (including client IDs): [ '62', 'm3cw9f6a4l' ]
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
All unseen messages marked as seen for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l.
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'message_seen' and data: {
  client_id: 'm3cw9f6a4l',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  isSeen: 1
}
{ user_id: 62 }
Admin 62 notified with event 'message_seen' and data: {
  client_id: 'm3cw9f6a4l',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  isSeen: 1
}
Client seen message ID: 521
Marking message as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
Message ID 521 marked as seen for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l.
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'message_seen by client' and data: {
  client_id: 'm3cw9f6a4l',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  is_seen: 1,
  message_id: '521'
}
{ user_id: 62 }
Admin 62 notified with event 'message_seen by client' and data: {
  client_id: 'm3cw9f6a4l',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  is_seen: 1,
  message_id: '521'
}
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
Participant already exists.
activeChats....
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l': { participants: Set(1) { 62 }, messages: [] }
}
Active session exists for client: m3cw9f6a4l
session id =  86
Admin 62 sent message to chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l: hellllllllllllllllllllllllllllll
[]
Client seen message ID: 523
Marking message as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
Message ID 523 marked as seen for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l.
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'message_seen by client' and data: {
  client_id: 'm3cw9f6a4l',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  is_seen: 1,
  message_id: '523'
}
{ user_id: 62 }
Admin 62 notified with event 'message_seen by client' and data: {
  client_id: 'm3cw9f6a4l',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  is_seen: 1,
  message_id: '523'
}
Participant already exists.
Participant already exists.
Participant already exists.
visitor status change {
  client_id: 'm3cw9f6a4l',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  status: 3
}
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
3 status
Notification to client m3cw9f6a4l: visitor chat status changed
admins is fetched
Admin 61 notified of visitor m3cw9f6a4l status change.
Admin 62 notified of visitor m3cw9f6a4l status change.
Visitor session status set to 3 for client m3cw9f6a4l
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
client data {
  name: null,
  client_id: 'm3cw9f6a4l',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
Received client data update: {
  client_id: 'm3cw9f6a4l',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  name: '',
  email: '',
  phone: '',
  notes: '',
  tags: []
}
Client data updated successfully for client_id: m3cw9f6a4l
Chat session tags updated successfully for chat_key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'client data updated' and data: {
  client_id: 'm3cw9f6a4l',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  name: '',
  email: '',
  phone: '',
  notes: '',
  tags: []
}
{ user_id: 62 }
Admin 62 notified with event 'client data updated' and data: {
  client_id: 'm3cw9f6a4l',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  name: '',
  email: '',
  phone: '',
  notes: '',
  tags: []
}
Received client data update: {
  client_id: 'm3cw9f6a4l',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  name: 'Yousuf Time',
  email: '',
  phone: '',
  notes: '',
  tags: []
}
Client data updated successfully for client_id: m3cw9f6a4l
Chat session tags updated successfully for chat_key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'client data updated' and data: {
  client_id: 'm3cw9f6a4l',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  name: 'Yousuf Time',
  email: '',
  phone: '',
  notes: '',
  tags: []
}
{ user_id: 62 }
Admin 62 notified with event 'client data updated' and data: {
  client_id: 'm3cw9f6a4l',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  name: 'Yousuf Time',
  email: '',
  phone: '',
  notes: '',
  tags: []
}
Received client data update: {
  client_id: 'm3cw9f6a4l',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  name: 'Yousuf Time',
  email: '',
  phone: '',
  notes: '',
  tags: []
}
Client data updated successfully for client_id: m3cw9f6a4l
Chat session tags updated successfully for chat_key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'client data updated' and data: {
  client_id: 'm3cw9f6a4l',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  name: 'Yousuf Time',
  email: '',
  phone: '',
  notes: '',
  tags: []
}
{ user_id: 62 }
Admin 62 notified with event 'client data updated' and data: {
  client_id: 'm3cw9f6a4l',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  name: 'Yousuf Time',
  email: '',
  phone: '',
  notes: '',
  tags: []
}
Admin 62 disconnected
Admin connected: 62
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37bsj23tf': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l': { participants: Set(0) {}, messages: [] }
}
62
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
join_time of active session:  2024-11-11T10:42:15.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:42:19.000Z,
  left_time: null
}
Total visitor sessions: 1
Total chat sessions: 1
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
client data {
  name: 'Yousuf Time',
  client_id: 'm3cw9f6a4l',
  email: '',
  phone: '',
  notes: '',
  tags: '[]'
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
last message id null
is old chat false
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
admin left the chat from bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
{ participants: Set(0) {}, messages: [] }
{ participants: Set(0) {}, messages: [] }
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{
  name: 'Yousuf Time',
  client_id: 'm3cw9f6a4l',
  online: '2024-11-11T10:42:20.000Z',
  servedBy: 'Melissa Richards',
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:42 PM',
  visitorStatus: 3,
  visitor_session_id: 119,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[
  {
    session_id: 86,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw9f6a4l',
    visitor_id: 119,
    chat_initiated_time: 2024-11-11T10:43:01.000Z,
    chat_start_time: 2024-11-11T10:43:01.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:43:01.000Z,
    tags: '[]',
    notes: ''
  }
]
[
  {
    session_id: 86,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw9f6a4l',
    visitor_id: 119,
    chat_initiated_time: 2024-11-11T10:43:01.000Z,
    chat_start_time: 2024-11-11T10:43:01.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:43:01.000Z,
    tags: '[]',
    notes: ''
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
Active session exists for client: m3cw9f6a4l
Admin 62 joined chat with client m3cw9f6a4l
No rating found for session 86
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
join_time of active session:  2024-11-11T10:42:15.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:42:19.000Z,
  left_time: null
}
Total visitor sessions: 1
Total chat sessions: 1
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
client data {
  name: 'Yousuf Time',
  client_id: 'm3cw9f6a4l',
  email: '',
  phone: '',
  notes: '',
  tags: '[]'
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
last message id null
is old chat false
admin left the chat from bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
{ participants: Set(1) { 62 }, messages: [] }
{ participants: Set(0) {}, messages: [] }
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{
  name: 'Yousuf Time',
  client_id: 'm3cw9f6a4l',
  online: '2024-11-11T10:42:20.000Z',
  servedBy: 'Melissa Richards',
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:42 PM',
  visitorStatus: 3,
  visitor_session_id: 119,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[
  {
    session_id: 86,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw9f6a4l',
    visitor_id: 119,
    chat_initiated_time: 2024-11-11T10:43:01.000Z,
    chat_start_time: 2024-11-11T10:43:01.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:43:01.000Z,
    tags: '[]',
    notes: ''
  }
]
[
  {
    session_id: 86,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw9f6a4l',
    visitor_id: 119,
    chat_initiated_time: 2024-11-11T10:43:01.000Z,
    chat_start_time: 2024-11-11T10:43:01.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:43:01.000Z,
    tags: '[]',
    notes: ''
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
Active session exists for client: m3cw9f6a4l
Admin 62 joined chat with client m3cw9f6a4l
No rating found for session 86
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
join_time of active session:  2024-11-11T10:42:15.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:42:19.000Z,
  left_time: null
}
Total visitor sessions: 1
Total chat sessions: 1
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
client data {
  name: 'Yousuf Time',
  client_id: 'm3cw9f6a4l',
  email: '',
  phone: '',
  notes: '',
  tags: '[]'
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
Participant added.
62
[
  {
    participant_id: 156,
    session_id: 86,
    user_id: '62',
    role: 'admin',
    join_time: 2024-11-11T10:43:01.000Z
  }
]
Active session exists for client: 86
Admin 62 joined chat with client 86
Participant already exists.
Participant already exists.
admin left the chat from bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
{ participants: Set(1) { 62 }, messages: [] }
{ participants: Set(0) {}, messages: [] }
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37bsj23tf on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Client m37bsj23tf disconnected
Status timeout already running for client m37bsj23tf.
Client m3cw9f6a4l disconnected
Status timeout already running for client m3cw9f6a4l.
Handling disconnection for: m37bsj23tf bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
Inactivity timeout cleared for client m37bsj23tf
Handled final disconnection for client m37bsj23tf
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
4 status
Notification to client m37bsj23tf: client disconnected
Visitor session status set to 4 for client m37bsj23tf
Status updated to 4 after disconnection for client m37bsj23tf
Chat session set to inactive for client m37bsj23tf
admins is fetched
Admin 61 notified of visitor m37bsj23tf status change.
Admin 62 notified of visitor m37bsj23tf status change.
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'client History updated' and data: {
  client_id: 'm37bsj23tf',
  client_name: null,
  served_by: 'Melissa Richards',
  chat_session_id: 85,
  brand_name: 'Swan Book Publishers',
  landing_url: 'https://swanbookpublishers.com/',
  IP_Health: 1,
  created_at: 2024-11-11T10:42:20.000Z,
  ip: '119.73.97.82',
  visitor_session_id: 120,
  country: 'Pakistan',
  browser: 'Google Chrome 116',
  os: 'MacOS',
  join_time: 2024-11-11T10:42:21.000Z,
  left_time: 2024-11-11T10:49:50.000Z
}
{ user_id: 62 }
Admin 62 notified with event 'client History updated' and data: {
  client_id: 'm37bsj23tf',
  client_name: null,
  served_by: 'Melissa Richards',
  chat_session_id: 85,
  brand_name: 'Swan Book Publishers',
  landing_url: 'https://swanbookpublishers.com/',
  IP_Health: 1,
  created_at: 2024-11-11T10:42:20.000Z,
  ip: '119.73.97.82',
  visitor_session_id: 120,
  country: 'Pakistan',
  browser: 'Google Chrome 116',
  os: 'MacOS',
  join_time: 2024-11-11T10:42:21.000Z,
  left_time: 2024-11-11T10:49:50.000Z
}
Client connected: m37btv8az1
Client connected
public key 4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163
chatKey: 4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163_m37btv8az1
New visitor session created for client m37btv8az1
visotor is here
query have been done []  now move  null
No active visitor session found. Creating a new session...
visitor status change {
  client_id: 'm37btv8az1',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  status: 1
}
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
1 status
Notification to client m37btv8az1: visitor chat status changed
admins is fetched
Admin 61 notified of visitor m37btv8az1 status change.
Admin 62 notified of visitor m37btv8az1 status change.
Visitor session status set to 3 for client m37btv8az1
Client connected: m3cw9f6a4l
Client connected
public key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
chatKey: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
Existing session found for client m3cw9f6a4l
Cleared existing inactivityTimeout for client m3cw9f6a4l
Cleared existing statusTimeout for client m3cw9f6a4l
Cleared existing disconnectTimeout for client m3cw9f6a4l
visotor is here
Visitor session status reset to active for client m3cw9f6a4l
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
3 status
Notification to client m3cw9f6a4l: Visitor status change
query have been done [
  {
    id: 119,
    client_id: 'm3cw9f6a4l',
    chat_session_id: 86,
    join_time: 2024-11-11T10:42:20.000Z,
    left_time: null,
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    landing_url: 'https://swanbookpublishers.com/',
    status: 3,
    IP_Health: 1
  }
]  now move  null
Existing visitor session found: {
  id: 119,
  client_id: 'm3cw9f6a4l',
  chat_session_id: 86,
  join_time: 2024-11-11T10:42:20.000Z,
  left_time: null,
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  landing_url: 'https://swanbookpublishers.com/',
  status: 3,
  IP_Health: 1
}
visitor status { status: 3, client_id: 'm3cw9f6a4l' }
Reconnect within one minute, using the existing session.
public key 1 bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
reset inactivity ...
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
{
  inactivityTimeout: null,
  disconnectTimeout: null,
  statusTimeout: null,
  lastStatus: 3,
  isConnected: true,
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082'
}
Public key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
admins is fetched
Admin 61 notified of visitor m3cw9f6a4l status change.
Admin 62 notified of visitor m3cw9f6a4l status change.
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
new client {
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  widgetId: 'd8c0c514-532f-4060-b105-151163499422-1731001762249',
  domain: 'swanbookpublishers.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Windows',
  url: 'https://swanbookpublishers.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm37btv8az1',
  joinTime: '11/11/2024, 3:49:54 PM'
}
Received visitor URL update: {
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  widgetId: 'd8c0c514-532f-4060-b105-151163499422-1731001762249',
  domain: 'swanbookpublishers.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Windows',
  url: 'https://swanbookpublishers.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm37btv8az1',
  joinTime: '11/11/2024, 3:49:54 PM'
}
No active visitor session found. Creating a new session...
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'visitor url update' and data: {
  url: 'https://swanbookpublishers.com/',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  clientId: 'm37btv8az1'
}
{ user_id: 62 }
Admin 62 notified with event 'visitor url update' and data: {
  url: 'https://swanbookpublishers.com/',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  clientId: 'm37btv8az1'
}
reset inactivity ...
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
{
  inactivityTimeout: null,
  disconnectTimeout: null,
  statusTimeout: 1,
  lastStatus: 1,
  isConnected: true,
  public_key: '4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163'
}
Public key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
New visitor session created: {
  sessionResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 121,
    info: '',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 0
  },
  visitorUpdateResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 0,
    info: 'Rows matched: 1  Changed: 1  Warnings: 0',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 1
  }
}
Admin 61 notified of existing chat with client m37btv8az1 from Pakistan (Karachi) on brand Swan Book Publishers
Admin 62 notified of existing chat with client m37btv8az1 from Pakistan (Karachi) on brand Swan Book Publishers
Using existing visitor session: 121
New chat session created by visitor: 88
Handling message for session: 88
Visitor added as participant in session 88
4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163_m37btv8az1
chatKey
Visitor sent message to chat 4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163_m37btv8az1: as
m37btv8az1
Number of valid numeric participants: []
All participants (including client IDs): [ 'm37btv8az1' ]
Admins fetched
notifyAllAdmins: true
No socket connection found for admin 60
Admin 61 notified with event 'New message blink', participant: true
Admin 62 notified with event 'New message blink', participant: true
{
  client_id: 'm39hqiy9ez',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  realName: 'Melissa Richards',
  userId: 62,
  visitor_session_id: 104
}
result of chat sessions....
[
  {
    session_id: 83,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm39hqiy9ez',
    visitor_id: 104,
    chat_initiated_time: 2024-11-11T10:40:38.000Z,
    chat_start_time: 2024-11-11T10:40:38.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:40:38.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 83,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm39hqiy9ez',
    visitor_id: 104,
    chat_initiated_time: 2024-11-11T10:40:38.000Z,
    chat_start_time: 2024-11-11T10:40:38.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:40:38.000Z,
    tags: null,
    notes: null
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez
Active session exists for client: m39hqiy9ez
Admin 62 joined chat with client m39hqiy9ez
No rating found for session 83
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
join_time of active session:  2024-11-09T01:32:18.000Z
Error fetching client metadata: Error: Error fetching visitor metadata: No metadata found for the provided client_id and join_time.
    at Object.getVisitorMetadata (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/models/ClientModel.js:283:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async fetchClientMetadata (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/controllers/ClientController.js:172:24)
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez
No active session found. Fetching the last session.
client data null
last message id null
is old chat false
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez.
{
  name: 'Hasnain',
  client_id: 'm37btv8az1',
  online: '2024-11-11T10:49:55.000Z',
  servedBy: '',
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:49 PM',
  visitorStatus: 1,
  visitor_session_id: 121,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 1,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[
  {
    session_id: 88,
    chat_key: '4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163_m37btv8az1',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: '',
    client_id: 'm37btv8az1',
    visitor_id: 121,
    chat_initiated_time: 2024-11-11T10:50:01.000Z,
    chat_start_time: null,
    chat_end_time: null,
    is_join: 0,
    is_active: 1,
    created_at: 2024-11-11T10:50:01.000Z,
    tags: null,
    notes: null
  }
]
No admin assigned to this client
[
  {
    session_id: 88,
    chat_key: '4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163_m37btv8az1',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: '',
    client_id: 'm37btv8az1',
    visitor_id: 121,
    chat_initiated_time: 2024-11-11T10:50:01.000Z,
    chat_start_time: null,
    chat_end_time: null,
    is_join: 0,
    is_active: 1,
    created_at: 2024-11-11T10:50:01.000Z,
    tags: null,
    notes: null
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
Active session exists for client: m37btv8az1
Admin 62 joined chat with client m37btv8az1
No rating found for session 88
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
All unseen messages marked as seen for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1.
chat message emit for comment
New participant inserted
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'message_seen' and data: {
  client_id: 'm37btv8az1',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  isSeen: 1
}
{ user_id: 62 }
Admin 62 notified with event 'message_seen' and data: {
  client_id: 'm37btv8az1',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  isSeen: 1
}
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'visitor served by update' and data: {
  client_id: 'm37btv8az1',
  realName: 'Melissa Richards',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  served_by: 'Melissa Richards'
}
{ user_id: 62 }
Admin 62 notified with event 'visitor served by update' and data: {
  client_id: 'm37btv8az1',
  realName: 'Melissa Richards',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  served_by: 'Melissa Richards'
}
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1.
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1.
join_time of active session:  2024-11-11T10:49:50.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:49:55.000Z,
  left_time: null
}
Total visitor sessions: 17
Total chat sessions: 12
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
No active session found. Fetching the last session.
client data {
  name: 'Hasnain',
  client_id: 'm37btv8az1',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
No active session found. Fetching the last session.
client data {
  name: 'Hasnain',
  client_id: 'm37btv8az1',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1.
Active session exists for client: m37btv8az1
Handling message for session: 88
4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163_m37btv8az1
chatKey
Visitor sent message to chat 4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163_m37btv8az1: as
m37btv8az1,62
Number of valid numeric participants: [ 62 ]
All participants (including client IDs): [ 'm37btv8az1', '62' ]
Admins fetched
notifyAllAdmins: false
No socket connection found for admin 60
Admin 61 notified with event 'New message blink', participant: false
Admin 62 notified with event 'New message blink', participant: true
admin left the chat from bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
{ participants: Set(1) { 62 }, messages: [] }
{ participants: Set(0) {}, messages: [] }
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Client m37btv8az1 disconnected
Status timeout already running for client m37btv8az1.
{
  name: 'Hasnain',
  client_id: 'm37btv8az1',
  online: '2024-11-11T10:49:55.000Z',
  servedBy: 'Melissa Richards',
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:49 PM',
  visitorStatus: 1,
  visitor_session_id: 121,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 1,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[
  {
    session_id: 88,
    chat_key: '4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163_m37btv8az1',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm37btv8az1',
    visitor_id: 121,
    chat_initiated_time: 2024-11-11T10:50:01.000Z,
    chat_start_time: null,
    chat_end_time: null,
    is_join: 0,
    is_active: 1,
    created_at: 2024-11-11T10:50:01.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 88,
    chat_key: '4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163_m37btv8az1',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm37btv8az1',
    visitor_id: 121,
    chat_initiated_time: 2024-11-11T10:50:01.000Z,
    chat_start_time: null,
    chat_end_time: null,
    is_join: 0,
    is_active: 1,
    created_at: 2024-11-11T10:50:01.000Z,
    tags: null,
    notes: null
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
Active session exists for client: m37btv8az1
Admin 62 joined chat with client m37btv8az1
No rating found for session 88
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
join_time of active session:  2024-11-11T10:49:50.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:49:55.000Z,
  left_time: null
}
Total visitor sessions: 17
Total chat sessions: 12
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
No active session found. Fetching the last session.
client data {
  name: 'Hasnain',
  client_id: 'm37btv8az1',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
All unseen messages marked as seen for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1.
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'message_seen' and data: {
  client_id: 'm37btv8az1',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  isSeen: 1
}
{ user_id: 62 }
Admin 62 notified with event 'message_seen' and data: {
  client_id: 'm37btv8az1',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  isSeen: 1
}
admin left the chat from bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1
{ participants: Set(1) { 62 }, messages: [] }
{ participants: Set(0) {}, messages: [] }
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{
  name: null,
  client_id: 'm3cw0vdzqw',
  online: '2024-11-11T10:35:40.000Z',
  servedBy: 'Melissa Richards',
  viewing: 'https://swanbookpublishers.com/',
  link: 'https://example.com',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  join_time: '3:35 PM',
  visitorStatus: 2,
  visitor_session_id: 116,
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  unseenMsg: 0,
  brand_name: 'Swan Book Publishers',
  realName: 'Melissa Richards',
  userId: 62
}
result of chat sessions....
[
  {
    session_id: 84,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw0vdzqw',
    visitor_id: 116,
    chat_initiated_time: 2024-11-11T10:40:41.000Z,
    chat_start_time: 2024-11-11T10:40:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:40:41.000Z,
    tags: null,
    notes: null
  }
]
[
  {
    session_id: 84,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw0vdzqw',
    visitor_id: 116,
    chat_initiated_time: 2024-11-11T10:40:41.000Z,
    chat_start_time: 2024-11-11T10:40:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:40:41.000Z,
    tags: null,
    notes: null
  }
]
room key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
Active session exists for client: m3cw0vdzqw
Admin 62 joined chat with client m3cw0vdzqw
Rating emitted for session 84: 1
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Emitting visitor data for client m37btv8az1 on brand Swan Book Publishers
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
join_time of active session:  2024-11-11T10:35:35.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '119.73.97.82',
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  city: 'Karachi',
  created_at: 2024-11-11T10:35:39.000Z,
  left_time: null
}
Total visitor sessions: 1
Total chat sessions: 1
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
client data {
  name: null,
  client_id: 'm3cw0vdzqw',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '119.73.97.82' }
visitor ip 119.73.97.82
last message id null
is old chat false
Marking all unseen messages as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
No unseen messages found for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw.
Participant added.
62
[
  {
    participant_id: 154,
    session_id: 84,
    user_id: '62',
    role: 'admin',
    join_time: 2024-11-11T10:40:41.000Z
  }
]
Active session exists for client: 84
Admin 62 joined chat with client 84
Participant already exists.
activeChats....
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36jho45bm': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw': { participants: Set(1) { 62 }, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37btv8az1': { participants: Set(0) {}, messages: [] }
}
Active session exists for client: m3cw0vdzqw
session id =  84
Admin 62 sent message to chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw: hi
[]
Handling disconnection for: m37btv8az1 bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
Inactivity timeout cleared for client m37btv8az1
Handled final disconnection for client m37btv8az1
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
4 status
Notification to client m37btv8az1: client disconnected
Visitor session status set to 4 for client m37btv8az1
Status updated to 4 after disconnection for client m37btv8az1
Chat session set to inactive for client m37btv8az1
admins is fetched
Admin 61 notified of visitor m37btv8az1 status change.
Admin 62 notified of visitor m37btv8az1 status change.
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'client History updated' and data: {
  client_id: 'm37btv8az1',
  client_name: 'Hasnain',
  served_by: 'Melissa Richards',
  chat_session_id: 88,
  brand_name: 'Swan Book Publishers',
  landing_url: 'https://swanbookpublishers.com/',
  IP_Health: 1,
  created_at: 2024-11-11T10:49:55.000Z,
  ip: '119.73.97.82',
  visitor_session_id: 121,
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  os: 'Windows',
  join_time: 2024-11-11T10:49:55.000Z,
  left_time: 2024-11-11T10:51:09.000Z
}
{ user_id: 62 }
Admin 62 notified with event 'client History updated' and data: {
  client_id: 'm37btv8az1',
  client_name: 'Hasnain',
  served_by: 'Melissa Richards',
  chat_session_id: 88,
  brand_name: 'Swan Book Publishers',
  landing_url: 'https://swanbookpublishers.com/',
  IP_Health: 1,
  created_at: 2024-11-11T10:49:55.000Z,
  ip: '119.73.97.82',
  visitor_session_id: 121,
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  os: 'Windows',
  join_time: 2024-11-11T10:49:55.000Z,
  left_time: 2024-11-11T10:51:09.000Z
}
Received client data update: {
  client_id: 'm3cw0vdzqw',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  name: 'Musab',
  email: '',
  phone: '',
  notes: '',
  tags: []
}
Client data updated successfully for client_id: m3cw0vdzqw
Chat session tags updated successfully for chat_key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'client data updated' and data: {
  client_id: 'm3cw0vdzqw',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  name: 'Musab',
  email: '',
  phone: '',
  notes: '',
  tags: []
}
{ user_id: 62 }
Admin 62 notified with event 'client data updated' and data: {
  client_id: 'm3cw0vdzqw',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  name: 'Musab',
  email: '',
  phone: '',
  notes: '',
  tags: []
}
admin left the chat from bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
{ participants: Set(1) { 62 }, messages: [] }
{ participants: Set(0) {}, messages: [] }
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Client m3cw0vdzqw disconnected
Status timeout already running for client m3cw0vdzqw.
Client connected: m3cw0vdzqw
Client connected
public key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
chatKey: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
Existing session found for client m3cw0vdzqw
Cleared existing inactivityTimeout for client m3cw0vdzqw
Cleared existing statusTimeout for client m3cw0vdzqw
Cleared existing disconnectTimeout for client m3cw0vdzqw
visotor is here
Visitor session status reset to active for client m3cw0vdzqw
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
1 status
Notification to client m3cw0vdzqw: Visitor status change
query have been done [
  {
    id: 116,
    client_id: 'm3cw0vdzqw',
    chat_session_id: 84,
    join_time: 2024-11-11T10:35:40.000Z,
    left_time: null,
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    landing_url: 'https://swanbookpublishers.com/',
    status: 1,
    IP_Health: 1
  }
]  now move  null
Existing visitor session found: {
  id: 116,
  client_id: 'm3cw0vdzqw',
  chat_session_id: 84,
  join_time: 2024-11-11T10:35:40.000Z,
  left_time: null,
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  landing_url: 'https://swanbookpublishers.com/',
  status: 1,
  IP_Health: 1
}
visitor status { status: 1, client_id: 'm3cw0vdzqw' }
Reconnect within one minute, using the existing session.
public key 1 bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
reset inactivity ...
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
{
  inactivityTimeout: null,
  disconnectTimeout: null,
  statusTimeout: null,
  lastStatus: 1,
  isConnected: true,
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082'
}
Public key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
admins is fetched
Admin 61 notified of visitor m3cw0vdzqw status change.
Admin 62 notified of visitor m3cw0vdzqw status change.
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
visitor status change {
  client_id: 'm3cw0vdzqw',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  status: 1
}
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
1 status
Notification to client m3cw0vdzqw: visitor chat status changed
admins is fetched
Admin 61 notified of visitor m3cw0vdzqw status change.
Admin 62 notified of visitor m3cw0vdzqw status change.
Visitor session status set to 3 for client m3cw0vdzqw
get chat history
chat key
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
[
  {
    session_id: 84,
    chat_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw',
    public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    served_by: 'Melissa Richards',
    client_id: 'm3cw0vdzqw',
    visitor_id: 116,
    chat_initiated_time: 2024-11-11T10:40:41.000Z,
    chat_start_time: 2024-11-11T10:40:41.000Z,
    chat_end_time: null,
    is_join: 1,
    is_active: 1,
    created_at: 2024-11-11T10:40:41.000Z,
    tags: '[]',
    notes: ''
  }
]
test key 
Received visitor URL update: {
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  widgetId: 'd8c0c514-532f-4060-b105-151163499422-1731001762249',
  domain: 'swanbookpublishers.com',
  browser: { name: 'Google Chrome', version: '130' },
  os: 'Windows',
  url: 'https://swanbookpublishers.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm3cw0vdzqw',
  joinTime: '11/11/2024, 3:51:30 PM'
}
[ { session_id: 84 } ]
62
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'visitor url update' and data: {
  url: 'https://swanbookpublishers.com/',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  clientId: 'm3cw0vdzqw'
}
{ user_id: 62 }
Admin 62 notified with event 'visitor url update' and data: {
  url: 'https://swanbookpublishers.com/',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  clientId: 'm3cw0vdzqw'
}
Emitting total unseen messages to client m3cw0vdzqw: 1
sent the messages to client
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Client seen message ID: 528
Marking message as seen for chat: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw
Message ID 528 marked as seen for chat bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw.
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
Admin 61 notified with event 'message_seen by client' and data: {
  client_id: 'm3cw0vdzqw',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  is_seen: 1,
  message_id: '528'
}
{ user_id: 62 }
Admin 62 notified with event 'message_seen by client' and data: {
  client_id: 'm3cw0vdzqw',
  public_key: 'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
  is_seen: 1,
  message_id: '528'
}
Client m36jho45bm disconnected
Status timeout already running for client m36jho45bm.
Handling disconnection for: m36jho45bm d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
Inactivity timeout cleared for client m36jho45bm
Handled final disconnection for client m36jho45bm
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
4 status
Notification to client m36jho45bm: client disconnected
Visitor session status set to 4 for client m36jho45bm
Status updated to 4 after disconnection for client m36jho45bm
Chat session set to inactive for client m36jho45bm
admins is fetched
Admins fetched
{ user_id: 51 }
{ user_id: 51 }
{ user_id: 53 }
{ user_id: 51 }
{ user_id: 53 }
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjE1NDUsImV4cCI6MTczMTkyNjM0NX0.vPSZcMbUxx2lBViwOiiZimHC7Ks98lI-qLz1YGpbmDc
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
{ userId: 62, role: 3, company_id: 16 }
58
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjE1NDUsImV4cCI6MTczMTkyNjM0NX0.vPSZcMbUxx2lBViwOiiZimHC7Ks98lI-qLz1YGpbmDc
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
{ brandId: '58' }
brand id : 58
[
  {
    script: 'http://test.vchat.ourprojectdemo.com:3000/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    file_path: '/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082.js'
  }
]
Inactivity timeout triggered for client: m3cw9f6a4l
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
2 status
Notification to client m3cw9f6a4l: visitor is idle
Status updated to 2 due to inactivity for client m3cw9f6a4l
admins is fetched
Admin 61 notified of visitor m3cw9f6a4l status change.
Admin 62 notified of visitor m3cw9f6a4l status change.
58
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjE1NDUsImV4cCI6MTczMTkyNjM0NX0.vPSZcMbUxx2lBViwOiiZimHC7Ks98lI-qLz1YGpbmDc
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
{ brandId: '58' }
brand id : 58
[
  {
    script: 'http://test.vchat.ourprojectdemo.com:3000/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    file_path: '/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082.js'
  }
]
Inactivity timeout triggered for client: m3cw0vdzqw
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
2 status
Notification to client m3cw0vdzqw: visitor is idle
Status updated to 2 due to inactivity for client m3cw0vdzqw
admins is fetched
Admin 61 notified of visitor m3cw0vdzqw status change.
Admin 62 notified of visitor m3cw0vdzqw status change.
58
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjE1NDUsImV4cCI6MTczMTkyNjM0NX0.vPSZcMbUxx2lBViwOiiZimHC7Ks98lI-qLz1YGpbmDc
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
{ brandId: '58' }
brand id : 58
[
  {
    script: 'http://test.vchat.ourprojectdemo.com:3000/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    file_path: '/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082.js'
  }
]
Admin 62 disconnected
admin@chatknot.com
admin@11009
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
Admin connected: 61
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l': { participants: Set(0) {}, messages: [] }
}
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjI5MjAsImV4cCI6MTczMTkyNzcyMH0.wZ0rHuxbgGvfuaiNeRQUZYFau1c36_pzDheqIPtQ4u8
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
{ userId: 61, role: 2, company_id: 16 }
58
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjI5MjAsImV4cCI6MTczMTkyNzcyMH0.wZ0rHuxbgGvfuaiNeRQUZYFau1c36_pzDheqIPtQ4u8
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
{ brandId: '58' }
brand id : 58
[
  {
    script: 'http://test.vchat.ourprojectdemo.com:3000/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    file_path: '/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082.js'
  }
]
Admin 61 disconnected
melissa.richards@chatknot.com
zoSDnrTc
62
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
62
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 62
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw0vdzqw': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l': { participants: Set(0) {}, messages: [] }
}
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m3cw0vdzqw on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjI5MzksImV4cCI6MTczMTkyNzczOX0.mbsbwxqlybpNvM_pNOWuc_ghT8_oqXs4h0_3cjdUxRw
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
{ userId: 62, role: 3, company_id: 16 }
58
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjI5MzksImV4cCI6MTczMTkyNzczOX0.mbsbwxqlybpNvM_pNOWuc_ghT8_oqXs4h0_3cjdUxRw
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
{ brandId: '58' }
brand id : 58
[
  {
    script: 'http://test.vchat.ourprojectdemo.com:3000/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    file_path: '/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082.js'
  }
]
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjI5MzksImV4cCI6MTczMTkyNzczOX0.mbsbwxqlybpNvM_pNOWuc_ghT8_oqXs4h0_3cjdUxRw
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
fetching users
fetching users 2
[
  {
    id: 60,
    real_name: 'Jennifer Conner',
    email: 'jennifer.conner@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:42:06.000Z,
    status: 1,
    name: 'Jennifer Conner',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 61,
    real_name: 'Admin',
    email: 'admin@chatknot.com',
    role_id: 2,
    designation: 'Admin',
    company_id: 16,
    created_at: 2024-11-07T17:43:08.000Z,
    status: 1,
    name: 'Admin',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 62,
    real_name: 'Melissa Richards',
    email: 'melissa.richards@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:45:02.000Z,
    status: 1,
    name: 'Melissa Richards',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  }
]
Client m3cw0vdzqw disconnected
Status timeout already running for client m3cw0vdzqw.
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjI5MzksImV4cCI6MTczMTkyNzczOX0.mbsbwxqlybpNvM_pNOWuc_ghT8_oqXs4h0_3cjdUxRw
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
fetching users
fetching users 2
[
  {
    id: 60,
    real_name: 'Jennifer Conner',
    email: 'jennifer.conner@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:42:06.000Z,
    status: 1,
    name: 'Jennifer Conner',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 61,
    real_name: 'Admin',
    email: 'admin@chatknot.com',
    role_id: 2,
    designation: 'Admin',
    company_id: 16,
    created_at: 2024-11-07T17:43:08.000Z,
    status: 1,
    name: 'Admin',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 62,
    real_name: 'Melissa Richards',
    email: 'melissa.richards@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:45:02.000Z,
    status: 1,
    name: 'Melissa Richards',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  }
]
Handling disconnection for: m3cw0vdzqw bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
Inactivity timeout cleared for client m3cw0vdzqw
Handled final disconnection for client m3cw0vdzqw
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
4 status
Notification to client m3cw0vdzqw: client disconnected
Visitor session status set to 4 for client m3cw0vdzqw
Status updated to 4 after disconnection for client m3cw0vdzqw
Chat session set to inactive for client m3cw0vdzqw
admins is fetched
Admin 62 notified of visitor m3cw0vdzqw status change.
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
{ user_id: 62 }
Admin 62 notified with event 'client History updated' and data: {
  client_id: 'm3cw0vdzqw',
  client_name: 'Musab',
  served_by: 'Melissa Richards',
  chat_session_id: 84,
  brand_name: 'Swan Book Publishers',
  landing_url: 'https://swanbookpublishers.com/',
  IP_Health: 1,
  created_at: 2024-11-11T10:51:28.000Z,
  ip: '119.73.97.82',
  visitor_session_id: 116,
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  os: 'Windows',
  join_time: 2024-11-11T10:35:40.000Z,
  left_time: 2024-11-11T11:03:22.000Z
}
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjI5MzksImV4cCI6MTczMTkyNzczOX0.mbsbwxqlybpNvM_pNOWuc_ghT8_oqXs4h0_3cjdUxRw
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
fetching users
fetching users 2
[
  {
    id: 60,
    real_name: 'Jennifer Conner',
    email: 'jennifer.conner@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:42:06.000Z,
    status: 1,
    name: 'Jennifer Conner',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 61,
    real_name: 'Admin',
    email: 'admin@chatknot.com',
    role_id: 2,
    designation: 'Admin',
    company_id: 16,
    created_at: 2024-11-07T17:43:08.000Z,
    status: 1,
    name: 'Admin',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 62,
    real_name: 'Melissa Richards',
    email: 'melissa.richards@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:45:02.000Z,
    status: 1,
    name: 'Melissa Richards',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  }
]
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjI5MzksImV4cCI6MTczMTkyNzczOX0.mbsbwxqlybpNvM_pNOWuc_ghT8_oqXs4h0_3cjdUxRw
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
fetching users
fetching users 2
[
  {
    id: 60,
    real_name: 'Jennifer Conner',
    email: 'jennifer.conner@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:42:06.000Z,
    status: 1,
    name: 'Jennifer Conner',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 61,
    real_name: 'Admin',
    email: 'admin@chatknot.com',
    role_id: 2,
    designation: 'Admin',
    company_id: 16,
    created_at: 2024-11-07T17:43:08.000Z,
    status: 1,
    name: 'Admin',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 62,
    real_name: 'Melissa Richards',
    email: 'melissa.richards@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:45:02.000Z,
    status: 1,
    name: 'Melissa Richards',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  }
]
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjI5MzksImV4cCI6MTczMTkyNzczOX0.mbsbwxqlybpNvM_pNOWuc_ghT8_oqXs4h0_3cjdUxRw
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
fetching users
fetching users 2
[
  {
    id: 60,
    real_name: 'Jennifer Conner',
    email: 'jennifer.conner@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:42:06.000Z,
    status: 1,
    name: 'Jennifer Conner',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 61,
    real_name: 'Admin',
    email: 'admin@chatknot.com',
    role_id: 2,
    designation: 'Admin',
    company_id: 16,
    created_at: 2024-11-07T17:43:08.000Z,
    status: 1,
    name: 'Admin',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 62,
    real_name: 'Melissa Richards',
    email: 'melissa.richards@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:45:02.000Z,
    status: 1,
    name: 'Melissa Richards',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  }
]
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjI5MzksImV4cCI6MTczMTkyNzczOX0.mbsbwxqlybpNvM_pNOWuc_ghT8_oqXs4h0_3cjdUxRw
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
fetching users
fetching users 2
[
  {
    id: 60,
    real_name: 'Jennifer Conner',
    email: 'jennifer.conner@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:42:06.000Z,
    status: 1,
    name: 'Jennifer Conner',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 61,
    real_name: 'Admin',
    email: 'admin@chatknot.com',
    role_id: 2,
    designation: 'Admin',
    company_id: 16,
    created_at: 2024-11-07T17:43:08.000Z,
    status: 1,
    name: 'Admin',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 62,
    real_name: 'Melissa Richards',
    email: 'melissa.richards@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:45:02.000Z,
    status: 1,
    name: 'Melissa Richards',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  }
]
Admin 62 disconnected
admin@chatknot.com
admin@11009
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
Admin connected: 61
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l': { participants: Set(0) {}, messages: [] }
}
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjMzNDMsImV4cCI6MTczMTkyODE0M30.RkHA_B25W71omUzKJCcWlsdvLILU9X3iV6hxeA31cVY
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
{ userId: 61, role: 2, company_id: 16 }
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjMzNDMsImV4cCI6MTczMTkyODE0M30.RkHA_B25W71omUzKJCcWlsdvLILU9X3iV6hxeA31cVY
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
fetching users
fetching users 2
[
  {
    id: 60,
    real_name: 'Jennifer Conner',
    email: 'jennifer.conner@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:42:06.000Z,
    status: 1,
    name: 'Jennifer Conner',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 61,
    real_name: 'Admin',
    email: 'admin@chatknot.com',
    role_id: 2,
    designation: 'Admin',
    company_id: 16,
    created_at: 2024-11-07T17:43:08.000Z,
    status: 1,
    name: 'Admin',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 62,
    real_name: 'Melissa Richards',
    email: 'melissa.richards@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:45:02.000Z,
    status: 1,
    name: 'Melissa Richards',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  }
]
Admin 61 disconnected
Admin connected: 61
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l': { participants: Set(0) {}, messages: [] }
}
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjMzNDMsImV4cCI6MTczMTkyODE0M30.RkHA_B25W71omUzKJCcWlsdvLILU9X3iV6hxeA31cVY
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
fetching users
fetching users 2
[
  {
    id: 60,
    real_name: 'Jennifer Conner',
    email: 'jennifer.conner@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:42:06.000Z,
    status: 1,
    name: 'Jennifer Conner',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 61,
    real_name: 'Admin',
    email: 'admin@chatknot.com',
    role_id: 2,
    designation: 'Admin',
    company_id: 16,
    created_at: 2024-11-07T17:43:08.000Z,
    status: 1,
    name: 'Admin',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 62,
    real_name: 'Melissa Richards',
    email: 'melissa.richards@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:45:02.000Z,
    status: 1,
    name: 'Melissa Richards',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  }
]
Admin 61 disconnected
melissa.richards@chatknot.com
zoSDnrTc
62
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
62
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 62
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l': { participants: Set(0) {}, messages: [] }
}
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 62 disconnected
62
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 62
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l': { participants: Set(0) {}, messages: [] }
}
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjMzNzYsImV4cCI6MTczMTkyODE3Nn0.G1MdWK6Ayie8n7ghvKsJ0PvoaF5NcUDWe8L8xjbGLc4
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
{ userId: 62, role: 3, company_id: 16 }
58
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjMzNzYsImV4cCI6MTczMTkyODE3Nn0.G1MdWK6Ayie8n7ghvKsJ0PvoaF5NcUDWe8L8xjbGLc4
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
{ brandId: '58' }
brand id : 58
[
  {
    script: 'http://test.vchat.ourprojectdemo.com:3000/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    file_path: '/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082.js'
  }
]
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjMzNzYsImV4cCI6MTczMTkyODE3Nn0.G1MdWK6Ayie8n7ghvKsJ0PvoaF5NcUDWe8L8xjbGLc4
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
fetching users
fetching users 2
[
  {
    id: 60,
    real_name: 'Jennifer Conner',
    email: 'jennifer.conner@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:42:06.000Z,
    status: 1,
    name: 'Jennifer Conner',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 61,
    real_name: 'Admin',
    email: 'admin@chatknot.com',
    role_id: 2,
    designation: 'Admin',
    company_id: 16,
    created_at: 2024-11-07T17:43:08.000Z,
    status: 1,
    name: 'Admin',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 62,
    real_name: 'Melissa Richards',
    email: 'melissa.richards@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:45:02.000Z,
    status: 1,
    name: 'Melissa Richards',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  }
]
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m3cw9f6a4l on brand Swan Book Publishers
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjMzNzYsImV4cCI6MTczMTkyODE3Nn0.G1MdWK6Ayie8n7ghvKsJ0PvoaF5NcUDWe8L8xjbGLc4
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
fetching users
fetching users 2
[
  {
    id: 60,
    real_name: 'Jennifer Conner',
    email: 'jennifer.conner@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:42:06.000Z,
    status: 1,
    name: 'Jennifer Conner',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 61,
    real_name: 'Admin',
    email: 'admin@chatknot.com',
    role_id: 2,
    designation: 'Admin',
    company_id: 16,
    created_at: 2024-11-07T17:43:08.000Z,
    status: 1,
    name: 'Admin',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 62,
    real_name: 'Melissa Richards',
    email: 'melissa.richards@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:45:02.000Z,
    status: 1,
    name: 'Melissa Richards',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  }
]
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjMzNzYsImV4cCI6MTczMTkyODE3Nn0.G1MdWK6Ayie8n7ghvKsJ0PvoaF5NcUDWe8L8xjbGLc4
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
{ userId: 62, role: 3, company_id: 16 }
58
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjMzNzYsImV4cCI6MTczMTkyODE3Nn0.G1MdWK6Ayie8n7ghvKsJ0PvoaF5NcUDWe8L8xjbGLc4
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
{ brandId: '58' }
brand id : 58
[
  {
    script: 'http://test.vchat.ourprojectdemo.com:3000/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    file_path: '/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082.js'
  }
]
58
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjMzNzYsImV4cCI6MTczMTkyODE3Nn0.G1MdWK6Ayie8n7ghvKsJ0PvoaF5NcUDWe8L8xjbGLc4
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
{ brandId: '58' }
brand id : 58
[
  {
    script: 'http://test.vchat.ourprojectdemo.com:3000/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    file_path: '/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082.js'
  }
]
58
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjMzNzYsImV4cCI6MTczMTkyODE3Nn0.G1MdWK6Ayie8n7ghvKsJ0PvoaF5NcUDWe8L8xjbGLc4
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
{ brandId: '58' }
brand id : 58
[
  {
    script: 'http://test.vchat.ourprojectdemo.com:3000/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    file_path: '/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082.js'
  }
]
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjMzNzYsImV4cCI6MTczMTkyODE3Nn0.G1MdWK6Ayie8n7ghvKsJ0PvoaF5NcUDWe8L8xjbGLc4
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
{ userId: 62, role: 3, company_id: 16 }
58
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjMzNzYsImV4cCI6MTczMTkyODE3Nn0.G1MdWK6Ayie8n7ghvKsJ0PvoaF5NcUDWe8L8xjbGLc4
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
{ brandId: '58' }
brand id : 58
[
  {
    script: 'http://test.vchat.ourprojectdemo.com:3000/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    file_path: '/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082.js'
  }
]
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjMzNzYsImV4cCI6MTczMTkyODE3Nn0.G1MdWK6Ayie8n7ghvKsJ0PvoaF5NcUDWe8L8xjbGLc4
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
{ userId: 62, role: 3, company_id: 16 }
Client m3cw9f6a4l disconnected
Status changed to 5 after 30 seconds of inactivity.
Visitor status updated to 5 for client m3cw9f6a4l
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
5 status
Notification to client m3cw9f6a4l: Visitor status change
admins is fetched
Admin 62 notified of visitor m3cw9f6a4l status change.
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjMzNzYsImV4cCI6MTczMTkyODE3Nn0.G1MdWK6Ayie8n7ghvKsJ0PvoaF5NcUDWe8L8xjbGLc4
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
fetching users
fetching users 2
[
  {
    id: 60,
    real_name: 'Jennifer Conner',
    email: 'jennifer.conner@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:42:06.000Z,
    status: 1,
    name: 'Jennifer Conner',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 61,
    real_name: 'Admin',
    email: 'admin@chatknot.com',
    role_id: 2,
    designation: 'Admin',
    company_id: 16,
    created_at: 2024-11-07T17:43:08.000Z,
    status: 1,
    name: 'Admin',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 62,
    real_name: 'Melissa Richards',
    email: 'melissa.richards@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:45:02.000Z,
    status: 1,
    name: 'Melissa Richards',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  }
]
Handling disconnection for: m3cw9f6a4l bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
Inactivity timeout cleared for client m3cw9f6a4l
Handled final disconnection for client m3cw9f6a4l
bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082 public key
4 status
Notification to client m3cw9f6a4l: client disconnected
Visitor session status set to 4 for client m3cw9f6a4l
Status updated to 4 after disconnection for client m3cw9f6a4l
Chat session set to inactive for client m3cw9f6a4l
admins is fetched
Admin 62 notified of visitor m3cw9f6a4l status change.
Admins fetched
{ user_id: 60 }
{ user_id: 61 }
{ user_id: 62 }
Admin 62 notified with event 'client History updated' and data: {
  client_id: 'm3cw9f6a4l',
  client_name: 'Yousuf Time',
  served_by: 'Melissa Richards',
  chat_session_id: 86,
  brand_name: 'Swan Book Publishers',
  landing_url: 'https://swanbookpublishers.com/',
  IP_Health: 1,
  created_at: 2024-11-11T10:42:19.000Z,
  ip: '119.73.97.82',
  visitor_session_id: 119,
  country: 'Pakistan',
  browser: 'Google Chrome 130',
  os: 'Windows',
  join_time: 2024-11-11T10:42:20.000Z,
  left_time: 2024-11-11T11:16:38.000Z
}
admin@chatknot.com
admin@11009
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
Admin connected: 61
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] }
}
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjM4MDksImV4cCI6MTczMTkyODYwOX0.51D9LTTL4lW5yU8uffOZSUfpyAu8RkLo-pWC5sD2OxI
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
{ userId: 61, role: 2, company_id: 16 }
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
58
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjM4MDksImV4cCI6MTczMTkyODYwOX0.51D9LTTL4lW5yU8uffOZSUfpyAu8RkLo-pWC5sD2OxI
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
{ brandId: '58' }
brand id : 58
[
  {
    script: 'http://test.vchat.ourprojectdemo.com:3000/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    file_path: '/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082.js'
  }
]
Admin 61 disconnected
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
Admin connected: 61
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] }
}
58
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjM4MDksImV4cCI6MTczMTkyODYwOX0.51D9LTTL4lW5yU8uffOZSUfpyAu8RkLo-pWC5sD2OxI
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
{ brandId: '58' }
brand id : 58
[
  {
    script: 'http://test.vchat.ourprojectdemo.com:3000/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    file_path: '/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082.js'
  }
]
Client connected: m3cw9f6a4l
Client connected
public key bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082
chatKey: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m3cw9f6a4l
New visitor session created for client m3cw9f6a4l
visotor is here
query have been done []  now move  null
No active visitor session found. Creating a new session...
Admin 61 disconnected
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
Admin connected: 61
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] }
}
58
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjM4MDksImV4cCI6MTczMTkyODYwOX0.51D9LTTL4lW5yU8uffOZSUfpyAu8RkLo-pWC5sD2OxI
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
{ brandId: '58' }
brand id : 58
[
  {
    script: 'http://test.vchat.ourprojectdemo.com:3000/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    file_path: '/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082.js'
  }
]
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjM4MDksImV4cCI6MTczMTkyODYwOX0.51D9LTTL4lW5yU8uffOZSUfpyAu8RkLo-pWC5sD2OxI
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
{ userId: 61, role: 2, company_id: 16 }
Admin 61 disconnected
58
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjM4MDksImV4cCI6MTczMTkyODYwOX0.51D9LTTL4lW5yU8uffOZSUfpyAu8RkLo-pWC5sD2OxI
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
{ brandId: '58' }
brand id : 58
[
  {
    script: 'http://test.vchat.ourprojectdemo.com:3000/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    file_path: '/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082.js'
  }
]
58
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjM4MDksImV4cCI6MTczMTkyODYwOX0.51D9LTTL4lW5yU8uffOZSUfpyAu8RkLo-pWC5sD2OxI
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
{ brandId: '58' }
brand id : 58
[
  {
    script: 'http://test.vchat.ourprojectdemo.com:3000/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    file_path: '/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082.js'
  }
]
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjM4MDksImV4cCI6MTczMTkyODYwOX0.51D9LTTL4lW5yU8uffOZSUfpyAu8RkLo-pWC5sD2OxI
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
fetching users
fetching users 2
[
  {
    id: 60,
    real_name: 'Jennifer Conner',
    email: 'jennifer.conner@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:42:06.000Z,
    status: 1,
    name: 'Jennifer Conner',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 61,
    real_name: 'Admin',
    email: 'admin@chatknot.com',
    role_id: 2,
    designation: 'Admin',
    company_id: 16,
    created_at: 2024-11-07T17:43:08.000Z,
    status: 1,
    name: 'Admin',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 62,
    real_name: 'Melissa Richards',
    email: 'melissa.richards@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:45:02.000Z,
    status: 1,
    name: 'Melissa Richards',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  }
]
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjM4MDksImV4cCI6MTczMTkyODYwOX0.51D9LTTL4lW5yU8uffOZSUfpyAu8RkLo-pWC5sD2OxI
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
{ userId: 61, role: 2, company_id: 16 }
58
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjM4MDksImV4cCI6MTczMTkyODYwOX0.51D9LTTL4lW5yU8uffOZSUfpyAu8RkLo-pWC5sD2OxI
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
{ brandId: '58' }
brand id : 58
[
  {
    script: 'http://test.vchat.ourprojectdemo.com:3000/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    file_path: '/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082.js'
  }
]
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjMzNzYsImV4cCI6MTczMTkyODE3Nn0.G1MdWK6Ayie8n7ghvKsJ0PvoaF5NcUDWe8L8xjbGLc4
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
{ userId: 62, role: 3, company_id: 16 }
58
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjMzNzYsImV4cCI6MTczMTkyODE3Nn0.G1MdWK6Ayie8n7ghvKsJ0PvoaF5NcUDWe8L8xjbGLc4
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
{ brandId: '58' }
brand id : 58
[
  {
    script: 'http://test.vchat.ourprojectdemo.com:3000/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    file_path: '/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082.js'
  }
]
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 61 disconnected
Admin connected: 61
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] }
}
Admin 61 disconnected
Admin connected: 61
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] }
}
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 61 disconnected
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
Admin connected: 61
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] }
}
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjEzNTYsImV4cCI6MTczMTkyNjE1Nn0.aJGP2YGUv7nTVhlEAo0nmROR2s1J1QGzrLyZYuSkv3k
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
{ userId: 61, role: 2, company_id: 16 }
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 61 disconnected
Admin 62 disconnected
62
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 62
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] }
}
58
{ user_id: 62, name: 'Melissa Richards' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjMzNzYsImV4cCI6MTczMTkyODE3Nn0.G1MdWK6Ayie8n7ghvKsJ0PvoaF5NcUDWe8L8xjbGLc4
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
{ brandId: '58' }
brand id : 58
[
  {
    script: 'http://test.vchat.ourprojectdemo.com:3000/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082',
    file_path: '/static/m37ld0jifhQu7Amz/bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082.js'
  }
]
Client connected: m37bnhq2yo
Client connected
public key 4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163
chatKey: 4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163_m37bnhq2yo
New visitor session created for client m37bnhq2yo
visotor is here
query have been done []  now move  null
No active visitor session found. Creating a new session...
Client connected: m37bnhq2yo
Client connected
public key 4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163
chatKey: 4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163_m37bnhq2yo
Existing session found for client m37bnhq2yo
visotor is here
Visitor session status reset to active for client m37bnhq2yo
4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163 public key
1 status
Notification to client m37bnhq2yo: Visitor status change
query have been done []  now move  null
No active visitor session found. Creating a new session...
admins is fetched
Client m37bnhq2yo disconnected
Client m37bnhq2yo disconnected
Status timeout already running for client m37bnhq2yo.
Disconnect timeout already running for client m37bnhq2yo.
Status changed to 5 after 30 seconds of inactivity.
Visitor status updated to 5 for client m37bnhq2yo
4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163 public key
5 status
Notification to client m37bnhq2yo: Visitor status change
admins is fetched
Handling disconnection for: m37bnhq2yo 4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163
Handled final disconnection for client m37bnhq2yo
4c142a68-2b4e-48c1-8cf5-fc7256f9f31b-1730982548163 public key
4 status
Notification to client m37bnhq2yo: client disconnected
Visitor session status set to 4 for client m37bnhq2yo
Status updated to 4 after disconnection for client m37bnhq2yo
Chat session set to inactive for client m37bnhq2yo
admins is fetched
Admins fetched
{ user_id: 53 }
{ user_id: 51 }
{ user_id: 53 }
Admin 62 disconnected
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYyLCJpYXQiOjE3MzEzMjMzNzYsImV4cCI6MTczMTkyODE3Nn0.G1MdWK6Ayie8n7ghvKsJ0PvoaF5NcUDWe8L8xjbGLc4
user
{
  role_id: 3,
  name: 'Melissa Richards',
  real_name: 'Melissa Richards',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ userId: 62, role: 3, company_id: 16 }
{ userId: 62, role: 3, company_id: 16 }
undefined
Error verifying token: JsonWebTokenError: jwt malformed
    at module.exports [as verify] (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/node_modules/jsonwebtoken/verify.js:70:17)
    at verifyToken (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/middleware/role.js:50:26)
    at Layer.handle [as handle_request] (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/node_modules/express/lib/router/route.js:149:13)
    at Route.dispatch (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/node_modules/express/lib/router/route.js:119:3)
    at Layer.handle [as handle_request] (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/node_modules/express/lib/router/layer.js:95:5)
    at /home/vchat/public_html/backend.vchat.ourprojectdemo.com/node_modules/express/lib/router/index.js:284:15
    at param (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/node_modules/express/lib/router/index.js:365:14)
    at param (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/node_modules/express/lib/router/index.js:376:14)
    at Function.process_params (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/node_modules/express/lib/router/index.js:421:3)
undefined
Error verifying token: JsonWebTokenError: jwt malformed
    at module.exports [as verify] (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/node_modules/jsonwebtoken/verify.js:70:17)
    at verifyToken (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/middleware/role.js:50:26)
    at Layer.handle [as handle_request] (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/node_modules/express/lib/router/route.js:149:13)
    at Route.dispatch (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/node_modules/express/lib/router/route.js:119:3)
    at Layer.handle [as handle_request] (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/node_modules/express/lib/router/layer.js:95:5)
    at /home/vchat/public_html/backend.vchat.ourprojectdemo.com/node_modules/express/lib/router/index.js:284:15
    at Function.process_params (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/node_modules/express/lib/router/index.js:346:12)
    at next (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/node_modules/express/lib/router/index.js:280:10)
    at Function.handle (/home/vchat/public_html/backend.vchat.ourprojectdemo.com/node_modules/express/lib/router/index.js:175:3)
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjM4MDksImV4cCI6MTczMTkyODYwOX0.51D9LTTL4lW5yU8uffOZSUfpyAu8RkLo-pWC5sD2OxI
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
{ userId: 61, role: 2, company_id: 16 }
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjM4MDksImV4cCI6MTczMTkyODYwOX0.51D9LTTL4lW5yU8uffOZSUfpyAu8RkLo-pWC5sD2OxI
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
fetching users
fetching users 2
[
  {
    id: 60,
    real_name: 'Jennifer Conner',
    email: 'jennifer.conner@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:42:06.000Z,
    status: 1,
    name: 'Jennifer Conner',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 61,
    real_name: 'Admin',
    email: 'admin@chatknot.com',
    role_id: 2,
    designation: 'Admin',
    company_id: 16,
    created_at: 2024-11-07T17:43:08.000Z,
    status: 1,
    name: 'Admin',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 62,
    real_name: 'Melissa Richards',
    email: 'melissa.richards@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:45:02.000Z,
    status: 1,
    name: 'Melissa Richards',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  }
]
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
Admin connected: 61
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] }
}
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjM4MDksImV4cCI6MTczMTkyODYwOX0.51D9LTTL4lW5yU8uffOZSUfpyAu8RkLo-pWC5sD2OxI
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
fetching users
fetching users 2
[
  {
    id: 60,
    real_name: 'Jennifer Conner',
    email: 'jennifer.conner@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:42:06.000Z,
    status: 1,
    name: 'Jennifer Conner',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 61,
    real_name: 'Admin',
    email: 'admin@chatknot.com',
    role_id: 2,
    designation: 'Admin',
    company_id: 16,
    created_at: 2024-11-07T17:43:08.000Z,
    status: 1,
    name: 'Admin',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 62,
    real_name: 'Melissa Richards',
    email: 'melissa.richards@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:45:02.000Z,
    status: 1,
    name: 'Melissa Richards',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  }
]
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
Admin connected: 61
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] }
}
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjEzNTYsImV4cCI6MTczMTkyNjE1Nn0.aJGP2YGUv7nTVhlEAo0nmROR2s1J1QGzrLyZYuSkv3k
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
{ userId: 61, role: 2, company_id: 16 }
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 61 disconnected
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
Admin connected: 61
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] }
}
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjEzNTYsImV4cCI6MTczMTkyNjE1Nn0.aJGP2YGUv7nTVhlEAo0nmROR2s1J1QGzrLyZYuSkv3k
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
{ userId: 61, role: 2, company_id: 16 }
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjEzNTYsImV4cCI6MTczMTkyNjE1Nn0.aJGP2YGUv7nTVhlEAo0nmROR2s1J1QGzrLyZYuSkv3k
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
fetching users
fetching users 2
[
  {
    id: 60,
    real_name: 'Jennifer Conner',
    email: 'jennifer.conner@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:42:06.000Z,
    status: 1,
    name: 'Jennifer Conner',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 61,
    real_name: 'Admin',
    email: 'admin@chatknot.com',
    role_id: 2,
    designation: 'Admin',
    company_id: 16,
    created_at: 2024-11-07T17:43:08.000Z,
    status: 1,
    name: 'Admin',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 62,
    real_name: 'Melissa Richards',
    email: 'melissa.richards@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:45:02.000Z,
    status: 1,
    name: 'Melissa Richards',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  }
]
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjEzNTYsImV4cCI6MTczMTkyNjE1Nn0.aJGP2YGUv7nTVhlEAo0nmROR2s1J1QGzrLyZYuSkv3k
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
{ userId: 61, role: 2, company_id: 16 }
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 60
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] }
}
No active visitor session found. Fetching the last session.
join_time of last session:  2024-11-08T18:52:20.000Z
left_time of last session:  2024-11-08T18:52:57.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '103.196.163.26',
  country: 'Pakistan',
  browser: 'undefined undefined',
  city: 'Karachi',
  created_at: 2024-11-08T18:52:24.000Z,
  left_time: 2024-11-08T18:52:57.000Z
}
Total visitor sessions: 4
Total chat sessions: 2
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw
No active session found. Fetching the last session.
client data {
  name: null,
  client_id: 'm37blee5iw',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '103.196.163.26' }
visitor ip 103.196.163.26
last message id null
is old chat false
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 60 disconnected
Admin connected: 60
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] }
}
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
No active visitor session found. Fetching the last session.
join_time of last session:  2024-11-08T18:52:20.000Z
left_time of last session:  2024-11-08T18:52:57.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '103.196.163.26',
  country: 'Pakistan',
  browser: 'undefined undefined',
  city: 'Karachi',
  created_at: 2024-11-08T18:52:24.000Z,
  left_time: 2024-11-08T18:52:57.000Z
}
Total visitor sessions: 4
Total chat sessions: 2
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw
No active session found. Fetching the last session.
client data {
  name: null,
  client_id: 'm37blee5iw',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '103.196.163.26' }
visitor ip 103.196.163.26
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 60 disconnected
last message id null
is old chat false
johndev@gmail.com
123
51
{
  role_id: 2,
  name: 'dev',
  real_name: 'john ',
  company_id: 1,
  canCreateUsers: 1,
  canCreateBrand: 1
}
51
{
  role_id: 2,
  name: 'dev',
  real_name: 'john ',
  company_id: 1,
  canCreateUsers: 1,
  canCreateBrand: 1
}
Admin connected: 51
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] }
}
{ user_id: 51, name: 'john ' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m36ki0nzz7 on brand chatknot
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjUxLCJpYXQiOjE3MzEzMjg1MzgsImV4cCI6MTczMTkzMzMzOH0.0Occ_rXkr2udnb2uZCxs9P_3ITQLYHMYJOrWpqfTwTw
user
{
  role_id: 2,
  name: 'dev',
  real_name: 'john ',
  company_id: 1,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 51, role: 2, company_id: 1 }
{ userId: 51, role: 2, company_id: 1 }
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin 51 disconnected
Admin connected: 60
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] }
}
No active visitor session found. Fetching the last session.
join_time of last session:  2024-11-08T18:52:20.000Z
left_time of last session:  2024-11-08T18:52:57.000Z
Visitor metadata: {
  os: 'Windows',
  ip: '103.196.163.26',
  country: 'Pakistan',
  browser: 'undefined undefined',
  city: 'Karachi',
  created_at: 2024-11-08T18:52:24.000Z,
  left_time: 2024-11-08T18:52:57.000Z
}
Total visitor sessions: 4
Total chat sessions: 2
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Here is chat key: bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m37blee5iw
No active session found. Fetching the last session.
client data {
  name: null,
  client_id: 'm37blee5iw',
  email: null,
  phone: null,
  notes: null,
  tags: null
}
visitor data { ip: '103.196.163.26' }
visitor ip 103.196.163.26
last message id null
is old chat false
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 60 disconnected
jennifer.conner@chatknot.com
a6muuaii
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 60
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] }
}
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 60 disconnected
jennifer.conner@chatknot.com
a6muuaii
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 60
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] }
}
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 60 disconnected
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
60
{
  role_id: 3,
  name: 'Jennifer Conner',
  real_name: 'Jennifer Conner',
  company_id: 16,
  canCreateUsers: 0,
  canCreateBrand: 0
}
Admin connected: 60
{
  'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m36ki0nzz7': { participants: Set(0) {}, messages: [] },
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] }
}
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
{ user_id: 60, name: 'Jennifer Conner' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
Admin 60 disconnected
Client m36ki0nzz7 disconnected
Status timeout already running for client m36ki0nzz7.
Handling disconnection for: m36ki0nzz7 d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
Inactivity timeout cleared for client m36ki0nzz7
Handled final disconnection for client m36ki0nzz7
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
4 status
Notification to client m36ki0nzz7: client disconnected
Visitor session status set to 4 for client m36ki0nzz7
Status updated to 4 after disconnection for client m36ki0nzz7
Chat session set to inactive for client m36ki0nzz7
admins is fetched
Admins fetched
{ user_id: 51 }
{ user_id: 51 }
{ user_id: 53 }
{ user_id: 51 }
{ user_id: 53 }
Client connected: m377gh8js8
Client connected
public key d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
chatKey: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713_m377gh8js8
New visitor session created for client m377gh8js8
visotor is here
query have been done []  now move  null
No active visitor session found. Creating a new session...
visitor status change {
  client_id: 'm377gh8js8',
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  status: 1
}
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
1 status
Notification to client m377gh8js8: visitor chat status changed
admins is fetched
Visitor session status set to 3 for client m377gh8js8
new client {
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  widgetId: 'c30ffcdc-672c-4154-bdd5-6ba2e6f3ae3a-1730937386922',
  domain: 'chatknot.com',
  browser: { name: 'Google Chrome', version: '116' },
  os: 'MacOS',
  url: 'https://chatknot.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm377gh8js8',
  joinTime: '11/11/2024, 17:43:17'
}
Received visitor URL update: {
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713',
  widgetId: 'c30ffcdc-672c-4154-bdd5-6ba2e6f3ae3a-1730937386922',
  domain: 'chatknot.com',
  browser: { name: 'Google Chrome', version: '116' },
  os: 'MacOS',
  url: 'https://chatknot.com/',
  referrer: '',
  ip: '',
  country: '',
  city: '',
  clientId: 'm377gh8js8',
  joinTime: '11/11/2024, 17:43:17'
}
No active visitor session found. Creating a new session...
Admins fetched
{ user_id: 51 }
{ user_id: 51 }
{ user_id: 53 }
{ user_id: 51 }
{ user_id: 53 }
reset inactivity ...
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
{
  inactivityTimeout: null,
  disconnectTimeout: null,
  statusTimeout: 1,
  lastStatus: 1,
  isConnected: true,
  public_key: 'd1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713'
}
Public key: d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713
New visitor session created: {
  sessionResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 122,
    info: '',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 0
  },
  visitorUpdateResult: ResultSetHeader {
    fieldCount: 0,
    affectedRows: 1,
    insertId: 0,
    info: 'Rows matched: 1  Changed: 1  Warnings: 0',
    serverStatus: 2,
    warningStatus: 0,
    changedRows: 1
  }
}
Admin 61 disconnected
Admin connected: 61
{
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] }
}
Admin 61 disconnected
61
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
Admin connected: 61
{
  'bf803a1b-ef2a-4ca1-923e-37be127b43f1-1731001202082_m39hqiy9ez': { participants: Set(0) {}, messages: [] }
}
{ user_id: 61, name: 'Admin' }
No brand ID provided, fetching visitors for all assigned brands.
Emitting visitor data for client m39hqiy9ez on brand Swan Book Publishers
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjYxLCJpYXQiOjE3MzEzMjM4MDksImV4cCI6MTczMTkyODYwOX0.51D9LTTL4lW5yU8uffOZSUfpyAu8RkLo-pWC5sD2OxI
user
{
  role_id: 2,
  name: 'Admin',
  real_name: 'Admin',
  company_id: 16,
  canCreateUsers: 1,
  canCreateBrand: 1
}
{ userId: 61, role: 2, company_id: 16 }
fetching users
fetching users 2
[
  {
    id: 60,
    real_name: 'Jennifer Conner',
    email: 'jennifer.conner@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:42:06.000Z,
    status: 1,
    name: 'Jennifer Conner',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 61,
    real_name: 'Admin',
    email: 'admin@chatknot.com',
    role_id: 2,
    designation: 'Admin',
    company_id: 16,
    created_at: 2024-11-07T17:43:08.000Z,
    status: 1,
    name: 'Admin',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  },
  {
    id: 62,
    real_name: 'Melissa Richards',
    email: 'melissa.richards@chatknot.com',
    role_id: 3,
    designation: 'Sales Representative',
    company_id: 16,
    created_at: 2024-11-07T17:45:02.000Z,
    status: 1,
    name: 'Melissa Richards',
    created_by_real_name: 'superadmin',
    company_name: 'Umme Amrah'
  }
]
Inactivity timeout triggered for client: m377gh8js8
d1cf6129-0275-4310-8cdc-e180dd3f76fd-1730937379713 public key
2 status
Notification to client m377gh8js8: visitor is idle
Status updated to 2 due to inactivity for client m377gh8js8
admins is fetched
