Skip to content

Commit d11b0a1

Browse files
DominikB2014claude
andcommitted
fix(slack): Use correct feature flag for explore identity prompt
The identity-linking prompt for explore links was gated on discover-basic, but the actual unfurl handler checks data-browsing-widget-unfurl. This caused unlinked users to be prompted to link their identity for unfurls that would silently produce nothing. Map each link type to its own feature flag. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 07d7f7f commit d11b0a1

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/sentry/integrations/slack/webhooks/event.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,16 @@ def _get_unfurlable_links(
195195
if link_type is None or args is None:
196196
continue
197197

198+
feature_flag = {
199+
LinkType.DISCOVER: "organizations:discover-basic",
200+
LinkType.EXPLORE: "organizations:data-browsing-widget-unfurl",
201+
}.get(link_type)
202+
198203
if (
199204
organization
200-
and link_type in (LinkType.DISCOVER, LinkType.EXPLORE)
205+
and feature_flag
201206
and not slack_request.has_identity
202-
and features.has(
203-
"organizations:discover-basic", organization, actor=request.user
204-
)
207+
and features.has(feature_flag, organization, actor=request.user)
205208
):
206209
try:
207210
analytics.record(

tests/sentry/integrations/slack/webhooks/events/test_explore_link_shared.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def share_explore_links_ephemeral_sdk(self, mock_match_link, mock_):
9797
def test_share_explore_links_unlinked_user(self) -> None:
9898
with assume_test_silo_mode(SiloMode.CONTROL):
9999
self.create_identity_provider(type="slack", external_id="TXXXXXXX1")
100-
with self.feature("organizations:discover-basic"):
100+
with self.feature("organizations:data-browsing-widget-unfurl"):
101101
data = self.share_explore_links_ephemeral_sdk()
102102

103103
blocks = orjson.loads(data["blocks"])

0 commit comments

Comments
 (0)