webex-bot 1.0.0__py2.py3-none-any.whl → 1.0.2__py2.py3-none-any.whl

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.
webex_bot/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  """Top-level package for Webex Bot."""
2
2
 
3
3
  __author__ = """Finbarr Brady"""
4
- __version__ = '1.0.0'
4
+ __version__ = '1.0.2'
@@ -51,6 +51,8 @@ class WebexWebsocketClient(object):
51
51
  self.tracking_id = f"webex-bot_{uuid.uuid4()}"
52
52
  self.session = requests.Session()
53
53
  self.session.headers = self._get_headers()
54
+ sdk_ua = self.teams._session.headers["User-Agent"]
55
+ self.teams._session.update_headers(self._get_headers(add_to_ua=f" ({sdk_ua})"))
54
56
  # log the tracking ID
55
57
  logger.info(f"Tracking ID: {self.tracking_id}")
56
58
  self.device_info = None
@@ -67,10 +69,11 @@ class WebexWebsocketClient(object):
67
69
  if proxy_connect is None:
68
70
  raise ImportError("Failed to load libraries for proxy, maybe forgot [proxy] option during installation.")
69
71
 
70
- def _get_headers(self):
72
+ def _get_headers(self, add_to_ua=''):
71
73
  return {
72
74
  "Authorization": f"Bearer {self.access_token}",
73
- "User-Agent": f"webex_bot/{__version__}",
75
+ "Content-type": "application/json;charset=utf-8",
76
+ "User-Agent": f"webex_bot/{__version__}{add_to_ua}",
74
77
  "trackingid": self.tracking_id
75
78
  }
76
79
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: webex_bot
3
- Version: 1.0.0
3
+ Version: 1.0.2
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
@@ -447,7 +447,7 @@ bot = WebexBot(teams_bot_token=os.getenv("WEBEX_ACCESS_TOKEN")
447
447
 
448
448
  * Fix for [issue #48][i48] - Fix for `Commands not being received` issue.
449
449
 
450
- ### 0.7.0 (2025-Jun-04)
450
+ ### 1.0.2 (2025-Jun-04)
451
451
 
452
452
  * Add connection headers to requests.
453
453
 
@@ -1,4 +1,4 @@
1
- webex_bot/__init__.py,sha256=nwMyyhrTqt09qyhzAGKoeikB4BA6TUXEQwliZezDnFY,95
1
+ webex_bot/__init__.py,sha256=z10qJtsBNxE7VupOXWcCIc71MOHpNYWOpfXhxa1PbAA,95
2
2
  webex_bot/exceptions.py,sha256=qs9yVitfJtvxwBMC8uCvTDOxUQ_oZjWFf1dU8Oaue14,740
3
3
  webex_bot/formatting.py,sha256=jvPKym-z8CIJygpPVTVbt6vFXQo9_HQHpRDJB-nh-SI,382
4
4
  webex_bot/webex_bot.py,sha256=np5uGnVJc-l9jrbD9UPeoZU5JeuD8THLWd6Ml9HTlJ4,21153
@@ -10,9 +10,9 @@ webex_bot/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
10
10
  webex_bot/models/command.py,sha256=MyThlDaEkGlj1fDE_i_wr79O3QboakimRme8yI744yo,5327
11
11
  webex_bot/models/response.py,sha256=d4k2ohR5SUVzvuQzcnm7jQQVTMB0gH9Kz9y09vkoAaU,2545
12
12
  webex_bot/websockets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- webex_bot/websockets/webex_websocket_client.py,sha256=v9fljWBqJKytu9KjXU6Av_zRFF6IQocTTv34TmHqeZ4,12279
14
- webex_bot-1.0.0.dist-info/licenses/LICENSE,sha256=93eGb10xmgkBP2Fh_n0E9YDXe0c0oz-FsnAimXG0S4Y,1072
15
- webex_bot-1.0.0.dist-info/METADATA,sha256=pivh1ttznv0tMsmBxnEdp62FuVEgMpK2oDwI128SulA,14654
16
- webex_bot-1.0.0.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
17
- webex_bot-1.0.0.dist-info/top_level.txt,sha256=q1Y0RtYYinR7oXSwL93cK59c2KN_CbMVca8MLWeF63M,10
18
- webex_bot-1.0.0.dist-info/RECORD,,
13
+ webex_bot/websockets/webex_websocket_client.py,sha256=9V5y6yFSoXggaDVjCU6UfQjQKDNLsk6c1vhN8At-2as,12513
14
+ webex_bot-1.0.2.dist-info/licenses/LICENSE,sha256=93eGb10xmgkBP2Fh_n0E9YDXe0c0oz-FsnAimXG0S4Y,1072
15
+ webex_bot-1.0.2.dist-info/METADATA,sha256=m4S8pE7KfYG4PoLqa3NBfjZ-wXYMGHzlADtqfwkcYBw,14654
16
+ webex_bot-1.0.2.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
17
+ webex_bot-1.0.2.dist-info/top_level.txt,sha256=q1Y0RtYYinR7oXSwL93cK59c2KN_CbMVca8MLWeF63M,10
18
+ webex_bot-1.0.2.dist-info/RECORD,,