{"id":4059,"date":"2026-01-10T19:38:24","date_gmt":"2026-01-10T19:38:24","guid":{"rendered":"https:\/\/www.dgtaware.com\/dgtinstantchat\/?page_id=4059"},"modified":"2026-01-23T23:05:52","modified_gmt":"2026-01-23T23:05:52","slug":"people","status":"publish","type":"page","link":"https:\/\/www.dgtaware.com\/dgtinstantchat\/people\/","title":{"rendered":"People"},"content":{"rendered":"<div data-spectra-id=\"b7540f6c\"\tstyle=\"overflow: visible; --spectra-background-gradient: linear-gradient(140deg, #00000000 0%, var(--ast-global-color-4) 100%);\" class=\"spectra-background-overlay has-container-overlay spectra-is-root-container alignfull spectra-overlay-color spectra-overflow spectra-background-gradient wp-block-spectra-container\" data-orientation=\"vertical\"\t>\n\t\n<div data-spectra-id=\"spectra-mh0imqpd-qaowlf\" style=\"overflow: visible\" class=\"spectra-overlay-color spectra-overflow wp-block-spectra-container\" data-orientation=\"vertical\">\n\t\n\t<h1 data-spectra-id=\"spectra-a8b25d73-heading\" style=\"--spectra-text-color: var(--ast-global-color-2)\" class=\"has-text-color spectra-text-color wp-block-spectra-content has-text-color has-var-ast-global-color-2-color\">\n\t\tPeople\t<\/h1>\n\n\n\t<p data-spectra-id=\"spectra-a8b25d73-desc\" class=\"wp-block-spectra-content\">\n\t\tHere, you can search for people by nickname and send them a \u201cHey\u201d. When people accept your Hey, they will appear as your friend.\t<\/p>\n\n<\/div>\n\n<\/div>\n\n\n\n\t\t\t\t<form id=\"pocket-search-form\" \n\t\t\t\t\t  style=\"margin-bottom:20px;margin-left:10px;margin-right:10px; display:flex; align-items:center; gap:10px; width:100%; margin-top:50px\">\n\t\t\t\t\t<div style=\"display:flex; align-items:center; border-radius:6px; padding:0; flex:1;\">\n\t\t\t\t\t\t<input type=\"text\" name=\"search\" id=\"search\" placeholder=\"Search people\"\n\t\t\t\t\t\t\t   style=\"border:none; outline:none; padding:10px; width:100%;\">\n\t\t\t\t\t\t<button id=\"ajax-btn-search\" type=\"submit\"\n\t\t\t\t\t\t\t\tstyle=\"background:none; border:none; cursor:pointer; font-size:18px;\">\n\t\t\t\t\t\t\t<span class=\"dashicons dashicons-search\"\n\t\t\t\t\t\t\t\t  style=\"font-size:40px; color:#FF6210; margin-right:6px; margin-bottom:16px;\"><\/span>\n\t\t\t\t\t\t<\/button>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/form>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<!-- MODAL -->\n\t\t\t\t<div id=\"userDetailsModal\" class=\"ud-modal\">\n\t\t\t\t\t<div class=\"ud-modal-content\">\n\t\t\t\t\t\t<span class=\"ud-close\">&times;<\/span>\n\t\t\t\t\t\t<div id=\"ud-body\">\n\t\t\t\t\t\t\tLoading...\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\n\t\t\t\t<style>\n\t\t\t\t.ud-modal {\n\t\t\t\t\tdisplay:none;\n\t\t\t\t\tposition:fixed;\n\t\t\t\t\tz-index:9999;\n\t\t\t\t\tleft:0; top:0;\n\t\t\t\t\twidth:100%; height:100%;\n\t\t\t\t\tbackground:rgba(0,0,0,0.6);\n\t\t\t\t}\n\n\t\t\t\t.ud-modal-content {\n\t\t\t\t\tbackground:#fff;\n\t\t\t\t\tmargin:10% auto;\n\t\t\t\t\tpadding:20px;\n\t\t\t\t\twidth:90%;\n\t\t\t\t\tmax-width:400px;\n\t\t\t\t\tborder-radius:10px;\n\t\t\t\t\tbox-shadow:0 0 20px rgba(0,0,0,0.3);\n\t\t\t\t}\n\n\t\t\t\t.ud-close {\n\t\t\t\t\tfloat:right;\n\t\t\t\t\tfont-size:28px;\n\t\t\t\t\tcursor:pointer;\n\t\t\t\t}\n\t\t\t\t<\/style>\n\t\t\t\t<!-- END OF MODAL -->\n\n\n\n\n\n\n\n\t\t\t\t<script>\n\n\t\t\t\tconst MAX_SEARCHED_RETURNS = 50;\n\t\t\t\tconst DEFAULT_AVATAR = \"https:\/\/cdn.pixabay.com\/photo\/2023\/02\/18\/11\/00\/icon-7797704_640.png\";\n\t\t\t\tlet INITIAL_USERS = [];\n\t\t\t\tlet userRecords = [];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\/\/CALL EXECUTION\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\t\t\t\tdocument.addEventListener(\"DOMContentLoaded\", async () => {\n\t\t\t\t\tawait loadInitialPeople(); \/\/Fills INITIAL_USERS array\n\t\t\t\t\tawait renderFetchedUsers();\n\t\t\t\t\tawait UpdateFetchedUserStatus(); \/\/Status\n\t\t\t\t});\n\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\/\/ On search button click\n\t\t\t\tdocument.getElementById(\"ajax-btn-search\").addEventListener(\"click\", async function(e) \n\t\t\t\t{\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\n\t\t\t\t\tuserRecords = [];\n\n\t\t\t\t\tconst search = document.getElementById(\"search\").value.trim();\n\t\t\t\t\tconst usersArea = document.getElementById(\"users_scroll_area\");\n\n\t\t\t\t\tif (search.length < 2) \n\t\t\t\t\t{\n\t\t\t\t\t\trenderFetchedUsers(); \/\/render initial users\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst senderId = localStorage.getItem(\"userID\");\n\t\t\t\t\t\n\t\t\t\t\t\/\/REST API search\n\t\t\t\t\tconst response = await fetch(`\/dgtinstantchat\/wp-json\/dgt\/v1\/people\/search?q=${encodeURIComponent(search)}&user_id=${encodeURIComponent(senderId)}`);\n\n\t\t\t\t\tuserRecords = await response.json();\n\n\t\t\t\t\tusersArea.innerHTML = \"\";\n\n\t\t\t\t\tif (!userRecords || userRecords.length === 0) return;\n\t\t\t\t\t\n\t\t\t\t\tawait renderFetchedUsers();\n\t\t\t\t\tawait UpdateFetchedUserStatus();\n\n\t\t\t\t\t\/*userRecords.forEach(record => \n\t\t\t\t\t{\n\t\t\t\t\t\tif (record.id == window.currentLoggedInUserID) return;\n\t\t\t\t\t\tusersArea.innerHTML += CreateUserItem(record);\n\t\t\t\t\t});*\/\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tasync function UpdateFetchedUserStatus() \n\t\t\t\t{\n\t\t\t\t\tconsole.log(\"UpdateFetchedUserStatus running...\");\n\t\t\t\t\t\n\t\t\t\t\tlet usersSet=INITIAL_USERS;\n\t\t\t\t\tif(userRecords.length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tusersSet=userRecords;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t\/\/ Extract nicknames\n\t\t\t\t\tconst nicknames = usersSet.map(u => u.nickname);\n\t\t\t\t\tconsole.log(\"Requesting status for:\", nicknames);\n\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t\/\/ Fetch statuses from your new batch endpoint\n\t\t\t\t\tconst response = await fetch(\"https:\/\/dgtaware.com:9100\/status\/nicks\", \n\t\t\t\t\t{\n\t\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\t\theaders: { \"Content-Type\": \"application\/json\" },\n\t\t\t\t\t\tbody: JSON.stringify({ nicknames })\n\t\t\t\t\t});\n\n\t\t\t\t\tconst statusMap = await response.json();\n\t\t\t\t\tconsole.log(\"Status map returned:\", statusMap);\n\t\t\t\t\t\n\t\t\n\t\t\t\t\t\n\t\t\t\t\tconst statusLookup = {}; \n\t\t\t\t\tfor (const entry of statusMap) \n\t\t\t\t\t{ \n\t\t\t\t\t\tstatusLookup[entry.nickname] = entry; \n\t\t\t\t\t}\n\n\t\t\t\t\t\/\/Update original array\n\t\t\t\t\tif(userRecords.length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tconsole.log(\"updating userRecords status\");\n\t\t\t\t\t\tuserRecords = userRecords.map(user => \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconst status = statusLookup[user.nickname];\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t...user,\n\t\t\t\t\t\t\t\tonline: status?.online || false,\n\t\t\t\t\t\t\t\tchannel: status?.channel || null\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tconsole.log(\"updating INITIAL_USERS status\");\n\t\t\t\t\t\tINITIAL_USERS = INITIAL_USERS.map(user => \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconst status = statusLookup[user.nickname];\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t...user,\n\t\t\t\t\t\t\t\tonline: status?.online || false,\n\t\t\t\t\t\t\t\tchannel: status?.channel || null\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\t\/\/Update GUI\n\t\t\t\t\tconsole.log(\"Calling now renderFetchedUsers\");\n\t\t\t\t\trenderFetchedUsers();\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\tfunction renderFetchedUsers() \n\t\t\t\t{\n\t\t\t\t\tconst usersArea = document.getElementById(\"users_scroll_area\");\n\t\t\t\t\tif (!usersArea) return;\n\t\t\t\t\tusersArea.innerHTML = \"\";\n\t\t\t\t\t\n\t\t\t\t\tif(userRecords.length <= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tconsole.log(\"Rendering inital users:\"+INITIAL_USERS.length);\n\t\t\t\t\t\tINITIAL_USERS.forEach(record => \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tusersArea.innerHTML += CreateUserItem(record);\t\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tconsole.log(\"Rendering  users records:\"+userRecords.length);\n\t\t\t\t\t\tuserRecords.forEach(record => \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tusersArea.innerHTML += CreateUserItem(record);\t\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tasync function loadInitialPeople() \n\t\t\t\t{\n\t\t\t\t\tif(INITIAL_USERS.length > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t\/\/Done already!\n\t\t\t\t\t\tconsole.log(\"Already fetched...\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst userId = localStorage.getItem(\"userID\");\n\t\t\t\t\tif (!userId) return;\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tconst response = await fetch(\n\t\t\t\t\t\t\t`\/dgtinstantchat\/wp-json\/dgt\/v1\/people?limit=${encodeURIComponent(MAX_SEARCHED_RETURNS)}&user_id=${encodeURIComponent(userId)}`\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tconst people = await response.json();\n\t\t\t\t\t\tINITIAL_USERS = people;\n\t\t\t\t\t\tconsole.log(\"Initial users fetched:\"+INITIAL_USERS.length);\n\t\t\t\t\t} \n\t\t\t\t\tcatch (err) \n\t\t\t\t\t{\n\t\t\t\t\t\tconsole.error(\"Error loading initial people:\", err);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\n\t\t\t\t\n\t\t\t\t\/*function RefreshUserListUI(users) \n\t\t\t\t{\n\t\t\t\t\tconsole.log(\"RefreshUserListUI executing\");\n\t\t\t\t\tconst usersArea = document.getElementById(\"users_scroll_area\");\n\t\t\t\t\tif (!usersArea) return;\n\n\t\t\t\t\tusersArea.innerHTML = \"\";\n\n\t\t\t\t\tINITIAL_USERS.forEach(record => \n\t\t\t\t\t{\n\t\t\t\t\t\tusersArea.innerHTML += CreateUserItem(record);\n\t\t\t\t\t});\n\t\t\t\t}*\/\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\n\t\t\t\tfunction CreateUserItem(record) \n\t\t\t\t{\n\t\t\t\t\tvar cor = \"grey\";\n\t\t\t\t\tif(record.online)\n\t\t\t\t\t{\n\t\t\t\t\t\tcor=\"green\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tconsole.log(\"CreateUserItem: \"+record.nickname+\" status: \"+record.online);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(!record.profilePhoto)\n\t\t\t\t\t{\n\t\t\t\t\t\trecord.profilePhoto = DEFAULT_AVATAR;\n\t\t\t\t\t}\n\t\t\t\t\t\n\n\t\n\t\t\t\t\treturn \"<div class=\\\"messenger-user-item\\\" onclick=\\\"userDetails(\"+record.id+\",'\"+record.profilePhoto+\"','\"+record.nickname+\"','\"+record.bio+\"','\"+record.gender+\"',\"+record.online+\")\\\" data-user-id=\\\"\"+record.id+\"\\\">   <div class=\\\"messenger-user-avatar-wrapper\\\"><img src=\\\"\"+record.profilePhoto+\"\\\" alt=\\\"\\\"><div style=\\\" width:20px;height:20px;border-radius:50%; background:\"+cor+\";position:absolute;top:0px;right:0px;\\\"> <\/div><\/div> <div class=\\\"messenger-user-name\\\">\"+record.nickname+\"<\/div><div class=\\\"messenger-user-job\\\">\"+record.bio+\"<\/div>  <button class=\\\"hey-btn\\\" onclick=\\\"event.stopPropagation(); sendHey(\"+record.id+\",'\"+record.nickname+\"')\\\">\ud83d\udc4b HEY <\/button>            <\/div>\";\n\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\/*function userDetails(user_id)\n\t\t\t\t{\n\t\t\t\t\talert(\"user id:\"+user_id);\n\t\t\t\t}*\/\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfunction userDetails(user_id, profilePhoto,nickname,bio,gender,online) \n\t\t\t\t{\n\t\t\t\t\tconst modal = document.getElementById(\"userDetailsModal\");\n\t\t\t\t\tconst body = document.getElementById(\"ud-body\");\n\n\t\t\t\t\tmodal.style.display = \"block\";\n\t\t\t\t\tbody.innerHTML = \"Loading...\";\n\n\t\t\t\t\tfetch(`\/dgtinstantchat\/wp-json\/dgt\/v1\/people\/keywords\/${user_id}`)\n\t\t\t\t\t\t.then(res => res.json())\n\t\t\t\t\t\t.then(user_arr => {\n\t\t\t\t\t\t\tconsole.log(JSON.stringify(user_arr));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tlet keywordsHtml = \"\"; user_arr.forEach(item => { keywordsHtml += `<span class=\"keyword-tag\">${item.keyword}<\/span> `; });\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbody.innerHTML = `\n\t\t\t\t\t\t\t\t<div style=\"text-align:center;\">\n\t\t\t\t\t\t\t\t\t<img decoding=\"async\" src=\"${profilePhoto || DEFAULT_AVATAR}\"  style=\"width:100px;height:100px;border-radius:50%;object-fit:cover;\">\n\t\t\t\t\t\t\t\t\t<h2>${nickname}<\/h2>\n\t\t\t\t\t\t\t\t\t<p><strong>Bio:<\/strong> ${bio || \"\u2014\"}<\/p>\n\t\t\t\t\t\t\t\t\t<p><strong>Gender:<\/strong> ${gender || \"\u2014\"}<\/p>\n\t\t\t\t\t\t\t\t\t<p><strong>Online:<\/strong> ${online ? \"Online\" : \"Offline\"}<\/p>\n\t\t\t\t\t\t\t\t\t<p><strong>Keywords:<\/strong> ${keywordsHtml}<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t`;\n\t\t\t\t\t\t\t\n\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.catch(err => {\n\t\t\t\t\t\t\tbody.innerHTML = \"Error loading user details\";\n\t\t\t\t\t\t\tconsole.error(err);\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t\/\/ Close modal when clicking X\n\t\t\t\tdocument.addEventListener(\"DOMContentLoaded\", () => \n\t\t\t\t{\n\t\t\t\t\tdocument.querySelector(\".ud-close\").onclick = () => {\n\t\t\t\t\t\tdocument.getElementById(\"userDetailsModal\").style.display = \"none\";\n\t\t\t\t\t};\n\n\t\t\t\t\t\/\/ Close when clicking outside modal\n\t\t\t\t\twindow.onclick = function(e) {\n\t\t\t\t\t\tconst modal = document.getElementById(\"userDetailsModal\");\n\t\t\t\t\t\tif (e.target === modal) modal.style.display = \"none\";\n\t\t\t\t\t};\n\t\t\t\t});\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\n\t\t\t\tfunction sendHey(userId, nickname) \/\/Is the destination!\n\t\t\t\t{\n\t\t\t\t\tconst sourceId = localStorage.getItem(\"userID\");\n\t\t\t\t\tif (!sourceId) \n\t\t\t\t\t{\n\t\t\t\t\t\tconsole.log(\"Invalid sender...\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tconst LoggedInUserSecret  = localStorage.getItem(\"secret\") || \"\";\n\n\t\t\t\t\tfetch(\"\/dgtinstantchat\/wp-json\/dgt\/v1\/hey\/send\", \n\t\t\t\t\t{\n\t\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\t\theaders: { \"Content-Type\": \"application\/json\",\"Authorization\": \"Bearer \" + LoggedInUserSecret },\n\t\t\t\t\n\t\t\t\t\t\tbody: JSON.stringify({ peer_id: userId,app_user_id:sourceId})\n\t\t\t\t\t})\n\t\t\t\t\t.then(res => res.json())\n\t\t\t\t\t.then(result => {\n\t\t\t\t\t\tif (!result.success) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\talert(result.error || \"Failed to send hey\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst item = document.querySelector(`.messenger-user-item[data-user-id=\"${userId}\"]`);\n\t\t\t\t\t\tif (item) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\titem.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t\talert(\"Hey sent to \" + nickname + \"!\");\n\t\t\t\t\t})\n\t\t\t\t\t.catch(err => \n\t\t\t\t\t{\n\t\t\t\t\t\tconsole.error(err);\n\t\t\t\t\t\talert(\"Network error sending hey\");\n\t\t\t\t\t});\n\t\t\t\t}\n\n        <\/script>\n    \n\n\n\n    <style>\n        .messenger-scroll-area {\n            width: 100%;\n            height: 200px; \n            overflow-x: auto;\n            overflow-y: hidden;\n            white-space: nowrap;\n            padding: 10px 5px;\n            box-sizing: border-box;\n            border: 2px solid #f5f5f5;\n        }\n        .messenger-user-item {\n            display: inline-block;\n            width: 150px;\n            margin-right: 20px;\n            text-align: center;\n            cursor: pointer;\n            position: relative;\n        }\n        .messenger-user-avatar-wrapper {\n            position: relative;\n            width: 70px;\n            height: 70px;\n            margin: auto;\n        }\n        .messenger-user-item img {\n            width: 70px;\n            height: 70px;\n            object-fit: cover;\n            border-radius: 50%;\n            border: 2px solid #6e60f8;\n        }\n        .messenger-user-name {\n            font-weight: bold;\n            margin-top: 6px;\n            font-size: 14px;\n            overflow: hidden;\n            text-overflow: ellipsis;\n            max-width: 100%;\n            display: block;\n        }\n        .messenger-user-job {\n            font-size: 12px;\n            overflow: hidden;\n            text-overflow: ellipsis;\n            max-width: 100%;\n            display: block;\n        }\n        .messenger-user-item.selected {\n            background-color: #FF6210 !important; \n            color: white !important;\n            border-radius: 10px;\n            padding: 5px;\n            transition: 0.2s ease;\n        }\n\t\t\n\t\t.dgt-centered-container { max-width: 800px; margin: 0 auto; padding-left: 10px; padding-right: 10px; box-sizing: border-box; }\n\t\t\n    <\/style>\n\n\n\n\n\n\n\n\t<script type=\"module\">\n\t\t\/\/CONNECT WEBSOCKET CLIENT TO LISTEN TO NOTIFICATIONS\n\t  \t\/\/does not reconect when you:  ws.close();\n\t  \t\/\/import WSClient from \"..\/js\/wsclient.js\"; \/\/ if you put it in a separate file\n\t  \timport WSClient from \"\/dgtinstantchat\/wp-content\/themes\/astra-child\/js\/wsclient.js\";\n\t\t\n\t\t\n\n\t  \tconst ws = new WSClient(\"wss:\/\/dgtaware.com:3000\", {autoReconnect: true,reconnectInterval: 3000});\n\n\t\t\/\/Not mandatory to rewrite these\n\t\t\/\/ws.on(\"open\", () => console.log(\"Connected\"));\n\t\t\/\/ws.on(\"message\", msg => console.log(\"Received:\", msg));\n\t\t\/\/ws.on(\"close\", () => console.log(\"Disconnected\"));\n\t\t\/\/ws.on(\"error\", err => console.error(\"Error:\", err));\n\n\t  \t\/\/ Send something\n\t  \t\/\/setTimeout(() => ws.send(\"Hello server\"), 1000);\n\t<\/script>\n\n\n\n\n\n\n\n\n\n\n    <div class=\"dgt-centered-container\"> \n\t\t<div id=\"users_scroll_area\" class=\"messenger-scroll-area\" >\n\t\t\t<p>Loading data...<\/p>\n    \t<\/div> \n\t<\/div>\n\n    \n\n\n\n<div style=\"height:200px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"no-sidebar","site-content-layout":"","ast-site-content-layout":"full-width-container","site-content-style":"unboxed","site-sidebar-style":"unboxed","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"enabled","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-4059","page","type-page","status-publish","hentry"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"root","author_link":"https:\/\/www.dgtaware.com\/dgtinstantchat\/author\/root\/"},"uagb_comment_info":0,"uagb_excerpt":null,"_links":{"self":[{"href":"https:\/\/www.dgtaware.com\/dgtinstantchat\/wp-json\/wp\/v2\/pages\/4059","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dgtaware.com\/dgtinstantchat\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.dgtaware.com\/dgtinstantchat\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.dgtaware.com\/dgtinstantchat\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dgtaware.com\/dgtinstantchat\/wp-json\/wp\/v2\/comments?post=4059"}],"version-history":[{"count":17,"href":"https:\/\/www.dgtaware.com\/dgtinstantchat\/wp-json\/wp\/v2\/pages\/4059\/revisions"}],"predecessor-version":[{"id":4246,"href":"https:\/\/www.dgtaware.com\/dgtinstantchat\/wp-json\/wp\/v2\/pages\/4059\/revisions\/4246"}],"wp:attachment":[{"href":"https:\/\/www.dgtaware.com\/dgtinstantchat\/wp-json\/wp\/v2\/media?parent=4059"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}