From 422e89caee705265d3fff28929aa83f3159d94e8 Mon Sep 17 00:00:00 2001 From: matiasc18 Date: Mon, 6 Apr 2026 12:25:47 -0400 Subject: [PATCH] Fixed serverFunctions naming issue --- src/apps/Forum/Forum.js | 2 +- src/apps/Forum/ForumPanel.js | 4 ++-- src/apps/Messages/Messages.js | 6 +++--- src/index.js | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/apps/Forum/Forum.js b/src/apps/Forum/Forum.js index 8bd04c6..e5fa756 100644 --- a/src/apps/Forum/Forum.js +++ b/src/apps/Forum/Forum.js @@ -52,7 +52,7 @@ // forum: global.currentNetwork.abbreviation, // text: this.value // } -// await global.Socket.send({ +// await global.socket.send({ // app: "FORUM", // operation: "SEND", // msg: msg diff --git a/src/apps/Forum/ForumPanel.js b/src/apps/Forum/ForumPanel.js index ea0fb18..eef24e2 100644 --- a/src/apps/Forum/ForumPanel.js +++ b/src/apps/Forum/ForumPanel.js @@ -93,7 +93,7 @@ // id: message.id, // text: "EDITED TEXT TEST!" // } -// await global.Socket.send({ +// await global.socket.send({ // app: "FORUM", // operation: "PUT", // msg: msg @@ -121,7 +121,7 @@ // }); // if (!this.isSending) { // this.isSending = true -// let res = await global.Socket.send({ +// let res = await global.socket.send({ // app: "FORUM", // operation: "GET", // msg: { diff --git a/src/apps/Messages/Messages.js b/src/apps/Messages/Messages.js index aff740b..939ff72 100644 --- a/src/apps/Messages/Messages.js +++ b/src/apps/Messages/Messages.js @@ -65,7 +65,7 @@ class Messages extends Shadow { .fontSize(1, em) .onKeyDown((e) => { if (e.key === "Enter") { - window.Socket.send({app: "MESSAGES", operation: "SEND", msg: { conversation: `CONVERSATION-${this.selectedConvoID}`, text: e.target.value }}) + global.socket.send({app: "MESSAGES", operation: "SEND", msg: { conversation: `CONVERSATION-${this.selectedConvoID}`, text: e.target.value }}) e.target.value = "" } }) @@ -76,7 +76,7 @@ class Messages extends Shadow { .verticalAlign("end") }) .onAppear(async () => { - let res = await global.Socket.send({app: "MESSAGES", operation: "GET"}) + let res = await global.socket.send({app: "MESSAGES", operation: "GET"}) if(!res) console.error("failed to get messages") if(res.msg.length > 0 && this.conversations.length === 0) { @@ -104,7 +104,7 @@ class Messages extends Shadow { .color("var(--accent)") .onKeyDown(function (e) { if (e.key === "Enter") { - window.Socket.send({app: "MESSAGES", operation: "ADDCONVERSATION", msg: {email: this.value }}) + global.socket.send({app: "MESSAGES", operation: "ADDCONVERSATION", msg: {email: this.value }}) this.value = "" } }) diff --git a/src/index.js b/src/index.js index baab8b6..77045d9 100644 --- a/src/index.js +++ b/src/index.js @@ -7,7 +7,7 @@ import util from "./util.js" const env = import.meta.env let Global = class { - Socket = new Socket() + socket = new Socket() profile = null currentNetwork = "" lastApp = "" @@ -195,7 +195,7 @@ let Global = class { } else if(status === 500) { ConnectionError() } else { - await this.Socket.init() + await this.socket.init() await this.setupPushNotifications() await this.onNavigate() Home()