diff options
author | Ryan Huber <rhuber@gmail.com> | 2017-02-02 06:35:41 -0800 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2017-02-02 06:35:41 -0800 |
commit | be168a3caae063f1e8e834bda66f964bd6f683d4 (patch) | |
tree | 10f4b6dc208b126e1db3d8d131c091a544352df4 | |
parent | d4920b661b99f53097343dffbb8774392c1a6b43 (diff) | |
download | wee-slack-be168a3caae063f1e8e834bda66f964bd6f683d4.tar.gz |
make event recorder plugin configurable and load at startup
-rw-r--r-- | wee_slack.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py index 2ba38bd..3017847 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1388,6 +1388,7 @@ class PluginConfig(object): 'trigger_value': 'false', 'unfurl_ignore_alt_text': 'false', 'cache_messages': 'true', + 'record_events': 'false', } # Set missing settings to their defaults. Load non-missing settings from @@ -1531,6 +1532,8 @@ if __name__ == "__main__": s = SlackRequest(tok, 'rtm.start', {}) global EVENTROUTER EVENTROUTER = EventRouter() + if config.record_events: + EVENTROUTER.record() EVENTROUTER.receive(s) EVENTROUTER.handle_next() w.hook_timer(10, 0, 0, "handle_next", "") |