From b3ac141315002aeaf7ae094ff4c6309ce9ac1350 Mon Sep 17 00:00:00 2001 From: Lyncoln Date: Fri, 16 Oct 2026 18:07:53 -0400 Subject: [PATCH] Changed receive to synapselistener --- core/server/server.py | 10 ++++++++-- plugins/rmass/{inbound => listeners}/__init__.py | 0 .../__pycache__/__init__.cpython-314.pyc | Bin .../__pycache__/receive.cpython-314.pyc | Bin .../receive.py => listeners/synapselistener.py} | 0 5 files changed, 8 insertions(+), 2 deletions(-) rename plugins/rmass/{inbound => listeners}/__init__.py (100%) rename plugins/rmass/{inbound => listeners}/__pycache__/__init__.cpython-314.pyc (100%) rename plugins/rmass/{inbound => listeners}/__pycache__/receive.cpython-314.pyc (100%) rename plugins/rmass/{inbound/receive.py => listeners/synapselistener.py} (100%) diff --git a/core/server/server.py b/core/server/server.py index 3a4128c..4329062 100644 --- a/core/server/server.py +++ b/core/server/server.py @@ -5,7 +5,7 @@ from http.server import HTTPServer, BaseHTTPRequestHandler from .dispatcher import dispatchRequest from .createresponse import buildResponse from core.runtime.outputs import buildOutput -from plugins.rmass.inbound import receive +from plugins.rmass.listeners import synapselistener port = int(os.environ.get("SERVER_PORT", 19001)) @@ -96,7 +96,9 @@ class RequestHandler(BaseHTTPRequestHandler): if self.path.startswith("/_matrix/app/v1/transactions/"): print("Matrix transaction received") + outputs = {} + content_length = int(self.headers["Content-Length"]) data = self.rfile.read(content_length) request = json.loads(data) @@ -104,8 +106,12 @@ class RequestHandler(BaseHTTPRequestHandler): requestjson = json.dumps(request, indent=4) print (request) print(requestjson) - outputs = buildOutput(data, receive, outputs) + + outputs = buildOutput(data, synapselistener, outputs) print (outputs) + #resolved = + #outputs = buildOperation(listener, outputs, resolved) + self.send_response(200) self.send_header("Content-Type", "application/json") self.send_header("Content-Length", "2") diff --git a/plugins/rmass/inbound/__init__.py b/plugins/rmass/listeners/__init__.py similarity index 100% rename from plugins/rmass/inbound/__init__.py rename to plugins/rmass/listeners/__init__.py diff --git a/plugins/rmass/inbound/__pycache__/__init__.cpython-314.pyc b/plugins/rmass/listeners/__pycache__/__init__.cpython-314.pyc similarity index 100% rename from plugins/rmass/inbound/__pycache__/__init__.cpython-314.pyc rename to plugins/rmass/listeners/__pycache__/__init__.cpython-314.pyc diff --git a/plugins/rmass/inbound/__pycache__/receive.cpython-314.pyc b/plugins/rmass/listeners/__pycache__/receive.cpython-314.pyc similarity index 100% rename from plugins/rmass/inbound/__pycache__/receive.cpython-314.pyc rename to plugins/rmass/listeners/__pycache__/receive.cpython-314.pyc diff --git a/plugins/rmass/inbound/receive.py b/plugins/rmass/listeners/synapselistener.py similarity index 100% rename from plugins/rmass/inbound/receive.py rename to plugins/rmass/listeners/synapselistener.py