File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
tests/sentry/api/endpoints Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1616 RpcUserOrganizationContext ,
1717)
1818from sentry .utils import jwt
19+ from sentry .utils .hashlib import md5_text
1920
2021logger = logging .getLogger (__name__ )
2122
@@ -70,7 +71,7 @@ def get(
7071 now = int (datetime .datetime .now (datetime .UTC ).timestamp ())
7172 exp = now + JWT_VALIDITY_WINDOW_SECONDS
7273 # intercom creates chat history based on this ID so we need one per (org, user) pair
73- intercom_user_id = f"{ user .id } -{ organization .id } "
74+ intercom_user_id = md5_text ( f"{ user .id } -{ organization .id } " ). hexdigest ()
7475
7576 # Build JWT claims - user_id is required by Intercom
7677 claims = {
Original file line number Diff line number Diff line change 11from sentry .testutils .cases import APITestCase
22from sentry .testutils .silo import control_silo_test
33from sentry .utils import jwt
4+ from sentry .utils .hashlib import md5_text
45
56
67@control_silo_test
@@ -27,7 +28,7 @@ def test_get_jwt_without_secret_configured(self) -> None:
2728 def test_get_jwt_success (self ) -> None :
2829 """With feature flag and secret configured, should return JWT and user data."""
2930 test_secret = "test-intercom-secret-key"
30- intercom_user_id = f"{ self .user .id } -{ self .organization .id } "
31+ intercom_user_id = md5_text ( f"{ self .user .id } -{ self .organization .id } " ). hexdigest ()
3132
3233 with (
3334 self .feature ("organizations:intercom-support" ),
You can’t perform that action at this time.
0 commit comments