Fixed HTML message formatting, Extended resolver for get, construct and transform functions, Added entire message history with aliasing for personal matrix account
This commit is contained in:
Binary file not shown.
@@ -1,11 +1,29 @@
|
||||
def resolveItem(action, item):
|
||||
resolved = {}
|
||||
if hasattr(action, "resolve"):
|
||||
for label, keys in action.resolve.items():
|
||||
for label, keys in action.resolve["get"].items():
|
||||
target = item
|
||||
|
||||
for key in keys:
|
||||
target = target[key]
|
||||
|
||||
resolved[label] = target
|
||||
if "construct" in action.resolve:
|
||||
for label2, piece in action.resolve["construct"].items():
|
||||
constructed = ""
|
||||
|
||||
for item in piece:
|
||||
if isinstance(item, dict):
|
||||
for key, value in item.items():
|
||||
item = resolved[value]
|
||||
|
||||
constructed += str(item)
|
||||
|
||||
resolved[label2] = constructed
|
||||
if "transform" in action.resolve:
|
||||
for source, mutation in action.resolve["transform"].items():
|
||||
for key, value in mutation.items():
|
||||
if resolved[source] == key:
|
||||
resolved[source] = value
|
||||
|
||||
return resolved
|
||||
|
||||
Reference in New Issue
Block a user