applyConditions filter added and in working state. Needs to be made more generic by removing specific output target
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,6 @@
|
||||
import json
|
||||
from core.runtime.outputs import buildOutput
|
||||
from core.runtime.applyconditions import applyConditions
|
||||
from core.execution.operation import buildOperation
|
||||
|
||||
def buildListener(listener, self):
|
||||
@@ -20,23 +21,31 @@ def buildListener(listener, self):
|
||||
#if applyConditions(listener, outputs)
|
||||
# continue
|
||||
|
||||
print(outputs)
|
||||
for event in outputs[listener.recursive["source"]]:
|
||||
#print(outputs)
|
||||
|
||||
|
||||
print("DEBUG")
|
||||
print(listener.recursive["source"])
|
||||
for item in outputs[listener.recursive["source"]]:
|
||||
outputs[listener.recursive["label"]] = item
|
||||
|
||||
if "state_key" in event:
|
||||
continue
|
||||
if event.get("sender") != "@lyncoln:loxthelion.com":
|
||||
continue
|
||||
if "com.loxthelion.rmass_message_id" in event.get("content", {}):
|
||||
continue
|
||||
if event.get("type") == "m.room.message":
|
||||
print("DEBUG item selection")
|
||||
#print(listener.recursive["label"])
|
||||
print(item)
|
||||
print(outputs["event"])
|
||||
|
||||
if applyConditions(listener, outputs):
|
||||
continue
|
||||
|
||||
#if "state_key" in event:
|
||||
#continue
|
||||
#if event.get("sender") != "@lyncoln:loxthelion.com":
|
||||
#continue
|
||||
#if "com.loxthelion.rmass_message_id" in event.get("content", {}):
|
||||
#continue
|
||||
#if event.get("type") == "m.room.message":
|
||||
# Process and forward to RMASS
|
||||
|
||||
outputs = buildOperation(listener.execute, outputs)
|
||||
|
||||
#outputs = buildOperation(listener.execute, outputs)
|
||||
#print(event)
|
||||
|
||||
self.send_response(200)
|
||||
self.send_header("Content-Type", "application/json")
|
||||
|
||||
Reference in New Issue
Block a user