Skip to content

Commit 37987da

Browse files
remove encoding
1 parent e6e08e4 commit 37987da

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/sentry/api/endpoints/organization_intercom_jwt.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
RpcUserOrganizationContext,
1717
)
1818
from sentry.utils import jwt
19-
from sentry.utils.hashlib import md5_text
2019

2120
logger = logging.getLogger(__name__)
2221

@@ -71,7 +70,7 @@ def get(
7170
now = int(datetime.datetime.now(datetime.UTC).timestamp())
7271
exp = now + JWT_VALIDITY_WINDOW_SECONDS
7372
# intercom creates chat history based on this ID so we need one per (org, user) pair
74-
intercom_user_id = md5_text(f"{user.id}-{organization.id}").hexdigest()
73+
intercom_user_id = f"{user.id}-{organization.id}"
7574

7675
# Build JWT claims - user_id is required by Intercom
7776
claims = {

tests/sentry/api/endpoints/test_organization_intercom_jwt.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from sentry.testutils.cases import APITestCase
22
from sentry.testutils.silo import control_silo_test
33
from sentry.utils import jwt
4-
from sentry.utils.hashlib import md5_text
54

65

76
@control_silo_test
@@ -28,7 +27,7 @@ def test_get_jwt_without_secret_configured(self) -> None:
2827
def test_get_jwt_success(self) -> None:
2928
"""With feature flag and secret configured, should return JWT and user data."""
3029
test_secret = "test-intercom-secret-key"
31-
intercom_user_id = md5_text(f"{self.user.id}-{self.organization.id}").hexdigest()
30+
intercom_user_id = f"{self.user.id}-{self.organization.id}"
3231

3332
with (
3433
self.feature("organizations:intercom-support"),

0 commit comments

Comments
 (0)