diff --git a/linkedin_matrix/user.py b/linkedin_matrix/user.py index c14fc26..fcbe9c7 100644 --- a/linkedin_matrix/user.py +++ b/linkedin_matrix/user.py @@ -585,7 +585,10 @@ async def _push_connected_state(self): # We haven't sent a CONNECTED state in the last 12 hours. or self._prev_connected_bridge_state + (12 * 60 * 60) < time.monotonic() ): - await self.push_bridge_state(BridgeStateEvent.CONNECTED) + await self.push_bridge_state( + BridgeStateEvent.CONNECTED, + info={"using_headers_from_user": self.client.using_headers_from_user}, + ) self._prev_connected_bridge_state = time.monotonic() else: self.log.trace("Event received on event stream, but not sending CONNECTED") diff --git a/linkedin_messaging/linkedin.py b/linkedin_messaging/linkedin.py index 304ff71..5678291 100644 --- a/linkedin_messaging/linkedin.py +++ b/linkedin_messaging/linkedin.py @@ -130,6 +130,8 @@ class LinkedInMessaging: ] headers: dict[str, str] + using_headers_from_user = False + _realtime_session_id: uuid.UUID _realtime_connection_id: Optional[uuid.UUID] = None @@ -149,6 +151,7 @@ def from_cookies_and_headers(cookies: dict[str, str], if headers: linkedin.headers = headers + linkedin.using_headers_from_user = True else: linkedin.headers = fallback_headers linkedin.update_headers_from_cookies()