webex-bot 1.0.5__tar.gz → 1.0.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. {webex_bot-1.0.5/webex_bot.egg-info → webex_bot-1.0.6}/PKG-INFO +4 -1
  2. {webex_bot-1.0.5 → webex_bot-1.0.6}/README.md +3 -0
  3. {webex_bot-1.0.5 → webex_bot-1.0.6}/setup.cfg +1 -1
  4. {webex_bot-1.0.5 → webex_bot-1.0.6}/setup.py +1 -1
  5. {webex_bot-1.0.5 → webex_bot-1.0.6}/webex_bot/__init__.py +1 -1
  6. {webex_bot-1.0.5 → webex_bot-1.0.6}/webex_bot/webex_bot.py +10 -4
  7. {webex_bot-1.0.5 → webex_bot-1.0.6/webex_bot.egg-info}/PKG-INFO +4 -1
  8. {webex_bot-1.0.5 → webex_bot-1.0.6}/CONTRIBUTING.rst +0 -0
  9. {webex_bot-1.0.5 → webex_bot-1.0.6}/LICENSE +0 -0
  10. {webex_bot-1.0.5 → webex_bot-1.0.6}/MANIFEST.in +0 -0
  11. {webex_bot-1.0.5 → webex_bot-1.0.6}/docs/Makefile +0 -0
  12. {webex_bot-1.0.5 → webex_bot-1.0.6}/docs/conf.py +0 -0
  13. {webex_bot-1.0.5 → webex_bot-1.0.6}/docs/contributing.rst +0 -0
  14. {webex_bot-1.0.5 → webex_bot-1.0.6}/docs/index.rst +0 -0
  15. {webex_bot-1.0.5 → webex_bot-1.0.6}/docs/installation.rst +0 -0
  16. {webex_bot-1.0.5 → webex_bot-1.0.6}/docs/make.bat +0 -0
  17. {webex_bot-1.0.5 → webex_bot-1.0.6}/docs/usage.rst +0 -0
  18. {webex_bot-1.0.5 → webex_bot-1.0.6}/tests/__init__.py +0 -0
  19. {webex_bot-1.0.5 → webex_bot-1.0.6}/tests/test_webex_bot.py +0 -0
  20. {webex_bot-1.0.5 → webex_bot-1.0.6}/webex_bot/cards/__init__.py +0 -0
  21. {webex_bot-1.0.5 → webex_bot-1.0.6}/webex_bot/commands/__init__.py +0 -0
  22. {webex_bot-1.0.5 → webex_bot-1.0.6}/webex_bot/commands/echo.py +0 -0
  23. {webex_bot-1.0.5 → webex_bot-1.0.6}/webex_bot/commands/help.py +0 -0
  24. {webex_bot-1.0.5 → webex_bot-1.0.6}/webex_bot/exceptions.py +0 -0
  25. {webex_bot-1.0.5 → webex_bot-1.0.6}/webex_bot/formatting.py +0 -0
  26. {webex_bot-1.0.5 → webex_bot-1.0.6}/webex_bot/models/__init__.py +0 -0
  27. {webex_bot-1.0.5 → webex_bot-1.0.6}/webex_bot/models/command.py +0 -0
  28. {webex_bot-1.0.5 → webex_bot-1.0.6}/webex_bot/models/response.py +0 -0
  29. {webex_bot-1.0.5 → webex_bot-1.0.6}/webex_bot/websockets/__init__.py +0 -0
  30. {webex_bot-1.0.5 → webex_bot-1.0.6}/webex_bot/websockets/webex_websocket_client.py +0 -0
  31. {webex_bot-1.0.5 → webex_bot-1.0.6}/webex_bot.egg-info/SOURCES.txt +0 -0
  32. {webex_bot-1.0.5 → webex_bot-1.0.6}/webex_bot.egg-info/dependency_links.txt +0 -0
  33. {webex_bot-1.0.5 → webex_bot-1.0.6}/webex_bot.egg-info/not-zip-safe +0 -0
  34. {webex_bot-1.0.5 → webex_bot-1.0.6}/webex_bot.egg-info/requires.txt +0 -0
  35. {webex_bot-1.0.5 → webex_bot-1.0.6}/webex_bot.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: webex_bot
3
- Version: 1.0.5
3
+ Version: 1.0.6
4
4
  Summary: Python package for a Webex Bot based on websockets.
5
5
  Home-page: https://github.com/fbradyirl/webex_bot
6
6
  Author: Finbarr Brady
@@ -460,6 +460,9 @@ bot = WebexBot(teams_bot_token=os.getenv("WEBEX_ACCESS_TOKEN")
460
460
 
461
461
  * Update UA
462
462
 
463
+ ### 1.0.6 (2025-Sept-17)
464
+
465
+ * Allow flag to disable bot to bot check
463
466
 
464
467
  [1]: https://github.com/aaugustin/websockets
465
468
 
@@ -420,6 +420,9 @@ bot = WebexBot(teams_bot_token=os.getenv("WEBEX_ACCESS_TOKEN")
420
420
 
421
421
  * Update UA
422
422
 
423
+ ### 1.0.6 (2025-Sept-17)
424
+
425
+ * Allow flag to disable bot to bot check
423
426
 
424
427
  [1]: https://github.com/aaugustin/websockets
425
428
 
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 1.0.5
2
+ current_version = 1.0.6
3
3
  commit = True
4
4
  tag = True
5
5
 
@@ -45,6 +45,6 @@ setup(
45
45
  test_suite='tests',
46
46
  tests_require=test_requirements,
47
47
  url='https://github.com/fbradyirl/webex_bot',
48
- version='1.0.5',
48
+ version='1.0.6',
49
49
  zip_safe=False,
50
50
  )
@@ -1,4 +1,4 @@
1
1
  """Top-level package for Webex Bot."""
2
2
 
3
3
  __author__ = """Finbarr Brady"""
4
- __version__ = '1.0.5'
4
+ __version__ = '1.0.6'
@@ -30,6 +30,7 @@ class WebexBot(WebexWebsocketClient):
30
30
  bot_name="Webex Bot",
31
31
  bot_help_subtitle="Here are my available commands. Click one to begin.",
32
32
  threads=True,
33
+ allow_bot_to_bot=False,
33
34
  help_command=None,
34
35
  log_level="INFO",
35
36
  proxies=None):
@@ -41,10 +42,11 @@ class WebexBot(WebexWebsocketClient):
41
42
  @param approved_domains: List of domains which are allowed to chat to this bot.
42
43
  @param approved_rooms: List of rooms whose members are allowed to chat to this bot.
43
44
  @param device_url: WDM Url
44
- @param include_demo_commands: If True, any demo commands will be included.
45
+ @param include_demo_commands: If True, any demo commands will be included. (default False)
45
46
  @param bot_name: Your custom name for the bot.
46
47
  @param bot_help_subtitle: Text to show in the help card.
47
- @param threads: If True, respond to msg by creating a thread.
48
+ @param threads: If True, respond to msg by creating a thread. (default True)
49
+ @param allow_bot_to_bot: If True, incoming messages from other bots will be processed. Use with caution to avoid message loops. (default False)
48
50
  @param help_command: If None, use internal HelpCommand, otherwise override.
49
51
  @param log_level: Set loggin level.
50
52
  @param proxies: Dictionary of proxies for connections.
@@ -91,6 +93,7 @@ class WebexBot(WebexWebsocketClient):
91
93
  self.approval_parameters_check()
92
94
  self.bot_display_name = ""
93
95
  self.threads = threads
96
+ self.allow_bot_to_bot = allow_bot_to_bot
94
97
 
95
98
  @backoff.on_exception(backoff.expo, requests.exceptions.ConnectionError)
96
99
  def get_me_info(self):
@@ -203,9 +206,12 @@ class WebexBot(WebexWebsocketClient):
203
206
  raw_message = teams_message.text
204
207
  is_one_on_one_space = 'ONE_ON_ONE' in activity['target']['tags']
205
208
 
206
- if activity['actor']['type'] != 'PERSON':
207
- log.debug('message is from a bot, ignoring')
209
+ if activity['actor']['type'] != 'PERSON' and not self.allow_bot_to_bot:
210
+ log.warning('Message is from a bot, ignoring')
208
211
  return
212
+ else:
213
+ log.warning(
214
+ f"Message is from a bot and allow_bot_to_bot is {self.allow_bot_to_bot}. Be careful not to create a message loop!")
209
215
 
210
216
  # Log details on message
211
217
  log.info(f"Message from {user_email}: {teams_message}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: webex_bot
3
- Version: 1.0.5
3
+ Version: 1.0.6
4
4
  Summary: Python package for a Webex Bot based on websockets.
5
5
  Home-page: https://github.com/fbradyirl/webex_bot
6
6
  Author: Finbarr Brady
@@ -460,6 +460,9 @@ bot = WebexBot(teams_bot_token=os.getenv("WEBEX_ACCESS_TOKEN")
460
460
 
461
461
  * Update UA
462
462
 
463
+ ### 1.0.6 (2025-Sept-17)
464
+
465
+ * Allow flag to disable bot to bot check
463
466
 
464
467
  [1]: https://github.com/aaugustin/websockets
465
468
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes