mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 19:06:09 +00:00
embedded bots: Run bot.initialize() if bot has this function.
This commit is contained in:
@@ -531,6 +531,8 @@ class EmbeddedBotWorker(QueueProcessingWorker):
|
|||||||
logging.error("Error: User %s has bot with invalid embedded bot service %s" % (
|
logging.error("Error: User %s has bot with invalid embedded bot service %s" % (
|
||||||
user_profile_id, service.name))
|
user_profile_id, service.name))
|
||||||
continue
|
continue
|
||||||
|
if hasattr(bot_handler, 'initialize'):
|
||||||
|
bot_handler.initialize(self.get_bot_api_client(user_profile))
|
||||||
if event['trigger'] == 'mention':
|
if event['trigger'] == 'mention':
|
||||||
message['content'] = extract_query_without_mention(
|
message['content'] = extract_query_without_mention(
|
||||||
message=message,
|
message=message,
|
||||||
|
|||||||
Reference in New Issue
Block a user