botserver: Remove obsolete state_handler param from handle_message().
MODIFY
zulip_botserver/tests/test_server.py
zulip_botserver/tests/test_server.py
@@ -6,7 +6,7 @@ from .server_test_lib import BotServerTestCase
class BotServerTests(BotServerTestCase):
class MockMessageHandler(object):
- def handle_message(self, message, bot_handler, state_handler):
+ def handle_message(self, message, bot_handler):
# type: (Any, Any, Any) -> None
assert message == {'key': "test message"}

MODIFY
zulip_botserver/zulip_botserver/server.py
zulip_botserver/zulip_botserver/server.py
@@ -74,13 +74,9 @@ def handle_bot(bot):
message_handler = lib_module.handler_class()
- # TODO: Handle stateful bots properly.
- state_handler = StateHandler()
-
event = request.get_json(force=True)
message_handler.handle_message(message=event["message"],
- bot_handler=restricted_client,
- state_handler=state_handler)
+ bot_handler=restricted_client)
return json.dumps("")
def parse_args():

botserver: Remove obsolete state_handler param from handle_message().