mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-12-23 07:31:57 +00:00
Enable proxying of Triggerless messages in TFWServer
This commit is contained in:
parent
cf4a5bc09d
commit
76456b36de
@ -24,11 +24,13 @@ class TFWServer:
|
||||
return self._fsm
|
||||
|
||||
def make_response(self, message):
|
||||
trigger = message.get('trigger', '')
|
||||
try: self.fsm.trigger(trigger, message=message)
|
||||
except AttributeError: log.debug('FSM failed to execute nonexistent trigger: "{}"'.format(trigger))
|
||||
return message
|
||||
|
||||
def proxy_filter(self, message):
|
||||
try: return self.fsm.trigger(message['key'], message=message)
|
||||
except AttributeError: return False
|
||||
return True
|
||||
|
||||
def listen(self, port):
|
||||
self.application.listen(port)
|
||||
|
Loading…
Reference in New Issue
Block a user