var minisrv_service_file = true; if (!request_headers.query.registering || !request_headers.query.subscriber_name || !request_headers.query.subscriber_username || !request_headers.query.subscriber_contact || !request_headers.query.subscriber_contact_method || !ssid_sessions[socket.ssid].session_store || !ssid_sessions[socket.ssid] || !socket.ssid ) { var errpage = wtvshared.doErrorPage(400); headers = errpage[0]; data = errpage[1]; } else { ssid_sessions[socket.ssid].setSessionData("subscriber_name", request_headers.query.subscriber_name); ssid_sessions[socket.ssid].setSessionData("subscriber_username", request_headers.query.subscriber_username); ssid_sessions[socket.ssid].setSessionData("subscriber_contact", request_headers.query.subscriber_contact); ssid_sessions[socket.ssid].setSessionData("subscriber_contact_method", request_headers.query.subscriber_contact_method); ssid_sessions[socket.ssid].setSessionData("subscriber_userid", 0); ssid_sessions[socket.ssid].setSessionData("registered", true); var mailstore_exists = ssid_sessions[socket.ssid].mailstore.mailstoreExists(); var mailbox_exists = false; if (!mailstore_exists) mailstore_exists = ssid_sessions[socket.ssid].mailstore.createMailstore(); if (mailstore_exists) { if (!ssid_sessions[socket.ssid].mailstore.mailboxExists(0)) { // mailbox does not yet exist, create it mailbox_exists = ssid_sessions[socket.ssid].mailstore.createMailbox(0); } if (mailbox_exists) { // Just created Inbox for the first time, so create the welcome message ssid_sessions[socket.ssid].mailstore.createWelcomeMessage(); } } if (!ssid_sessions[socket.ssid].saveSessionData(true, true)) { var errpage = wtvshared.doErrorPage(400); headers = errpage[0]; data = errpage[1]; } else { headers = `200 OK Content-Type: text/html`; data = ` Finished signing up
You've finished signing up
Thank you for signing up for ${minisrv_config.config.service_name}.

You will now go to your Web Home page. You can always connect to the Internet by choosing Web Home on your TV Home page.


`; } }