bot_lib: Add user_id attribute to EmbeddedBotHandler.

Support for extended mention syntax was added as a part of
commit fbe99b812ee8fbca7257a5b7156c57a6cd74195b in the
python-zulip-api repository. The relevant function,
extract_query_without_mention now relies on the client's ID
in order to check for the extended syntax. Since the
EmbeddedBotHandler has no user_id attribute, the latest
python-zulip-api release broke a test in the main repo.
This commit is contained in:
Eeshan Garg
2018-12-17 17:56:59 -03:30
parent d84d3777fd
commit ebf5104923

View File

@@ -68,6 +68,7 @@ class EmbeddedBotHandler:
self.full_name = user_profile.full_name
self.email = user_profile.email
self.storage = StateHandler(user_profile)
self.user_id = user_profile.id
def send_message(self, message: Dict[str, Any]) -> None:
if not self._rate_limit.is_legal():