Skip to content

feat(prompts): support a visible status for un-hiding components #74228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/sentry/api/endpoints/prompts_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from sentry.models.promptsactivity import PromptsActivity
from sentry.utils.prompts import prompt_config

VALID_STATUSES = frozenset(("snoozed", "dismissed"))
VALID_STATUSES = frozenset(("snoozed", "dismissed", "visible"))


# Endpoint to retrieve multiple PromptsActivity at once
Expand Down Expand Up @@ -106,6 +106,9 @@ def put(self, request: Request, **kwargs):
data["snoozed_ts"] = now
elif status == "dismissed":
data["dismissed_ts"] = now
elif status == "visible":
data["snoozed_ts"] = None
data["dismissed_ts"] = None

try:
with transaction.atomic(router.db_for_write(PromptsActivity)):
Expand Down
Loading