Changed receive to synapselistener

This commit is contained in:
Lyncoln
2026-10-16 18:07:53 -04:00
parent 9f282a4bd8
commit b3ac141315
5 changed files with 8 additions and 2 deletions
+8 -2
View File
@@ -5,7 +5,7 @@ from http.server import HTTPServer, BaseHTTPRequestHandler
from .dispatcher import dispatchRequest from .dispatcher import dispatchRequest
from .createresponse import buildResponse from .createresponse import buildResponse
from core.runtime.outputs import buildOutput 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)) port = int(os.environ.get("SERVER_PORT", 19001))
@@ -96,7 +96,9 @@ class RequestHandler(BaseHTTPRequestHandler):
if self.path.startswith("/_matrix/app/v1/transactions/"): if self.path.startswith("/_matrix/app/v1/transactions/"):
print("Matrix transaction received") print("Matrix transaction received")
outputs = {} outputs = {}
content_length = int(self.headers["Content-Length"]) content_length = int(self.headers["Content-Length"])
data = self.rfile.read(content_length) data = self.rfile.read(content_length)
request = json.loads(data) request = json.loads(data)
@@ -104,8 +106,12 @@ class RequestHandler(BaseHTTPRequestHandler):
requestjson = json.dumps(request, indent=4) requestjson = json.dumps(request, indent=4)
print (request) print (request)
print(requestjson) print(requestjson)
outputs = buildOutput(data, receive, outputs)
outputs = buildOutput(data, synapselistener, outputs)
print (outputs) print (outputs)
#resolved =
#outputs = buildOperation(listener, outputs, resolved)
self.send_response(200) self.send_response(200)
self.send_header("Content-Type", "application/json") self.send_header("Content-Type", "application/json")
self.send_header("Content-Length", "2") self.send_header("Content-Length", "2")