Options: allow comparing Choices with other Choices

This commit is contained in:
Fabian Dill
2021-09-04 17:53:09 +02:00
parent e53b5324f5
commit 23b8070b9d
2 changed files with 8 additions and 4 deletions

View File

@@ -150,8 +150,8 @@ class JSONtoTextParser(metaclass=HandlerMeta):
return "".join(self.handle_node(section) for section in input_object)
def handle_node(self, node: JSONMessagePart):
type = node.get("type", None)
handler = self.handlers.get(type, self.handlers["text"])
node_type = node.get("type", None)
handler = self.handlers.get(node_type, self.handlers["text"])
return handler(node)
def _handle_color(self, node: JSONMessagePart):