Added blocking for echo messages
This commit is contained in:
@@ -18,6 +18,7 @@ def buildListener(listener, self):
|
|||||||
print("Matrix transaction received")
|
print("Matrix transaction received")
|
||||||
|
|
||||||
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)
|
||||||
|
|
||||||
@@ -25,20 +26,22 @@ def buildListener(listener, self):
|
|||||||
|
|
||||||
outputs = buildOutput(data, listener, outputs)
|
outputs = buildOutput(data, listener, outputs)
|
||||||
|
|
||||||
#if applyConditions(listener, outputs)
|
|
||||||
# continue
|
|
||||||
|
|
||||||
#print(outputs)
|
|
||||||
|
|
||||||
|
|
||||||
for item in outputs[listener.recursive["source"]]:
|
for item in outputs[listener.recursive["source"]]:
|
||||||
|
|
||||||
if applyConditions(listener, item, outputs):
|
|
||||||
continue
|
|
||||||
# Process and forward to RMASS
|
|
||||||
|
|
||||||
outputs, responses = buildOperation(listener.execute, outputs)
|
match, filter = applyConditions(listener, item, outputs)
|
||||||
|
|
||||||
|
if not match:
|
||||||
|
if "com.loxthelion.rmass_message_id" in item.get("content", {}):
|
||||||
|
print("APPLYING BLOCKER")
|
||||||
|
print(item)
|
||||||
|
continue
|
||||||
|
|
||||||
|
print(item)
|
||||||
|
#Process and forward to RMASS
|
||||||
|
|
||||||
|
outputs, responses = buildOperation(listener.execute, outputs)
|
||||||
|
|
||||||
|
continue
|
||||||
|
|
||||||
|
|
||||||
self.send_response(200)
|
self.send_response(200)
|
||||||
|
|||||||
Reference in New Issue
Block a user