Remove url from sms notification, change format (#2317)
# What this PR does Remove link from sms notification to avoid difficulties with different countries anti-spam regulations ## Which issue(s) this PR fixes ## Checklist - [ ] Unit, integration, and e2e (if applicable) tests updated - [ ] Documentation added (or `pr:no public docs` PR label added if not required) - [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required) --------- Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
This commit is contained in:
parent
f35ed45e2e
commit
5cc06b7041
3 changed files with 13 additions and 14 deletions
|
|
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Changed
|
||||
|
||||
- Removed url from sms notification, changed format ([2317](https://github.com/grafana/oncall/pull/2317))
|
||||
|
||||
## v1.3.4 (2023-07-05)
|
||||
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -18,17 +18,9 @@ class AlertGroupSmsRenderer(AlertGroupBaseRenderer):
|
|||
def render(self):
|
||||
templated_alert = self.alert_renderer.templated_alert
|
||||
title = str_or_backup(templated_alert.title, DEFAULT_BACKUP_TITLE)
|
||||
if self.alert_group.channel.organization.slack_team_identity and (
|
||||
permalink := self.alert_group.slack_permalink
|
||||
):
|
||||
incident_link = permalink
|
||||
else:
|
||||
incident_link = self.alert_group.web_link
|
||||
return (
|
||||
f"You are invited to check an incident #{self.alert_group.inside_organization_number} with title "
|
||||
f'"{title}" in Grafana OnCall organization: "{self.alert_group.channel.organization.stack_slug}", '
|
||||
f"alert channel: {self.alert_group.channel.short_name}, "
|
||||
f"alerts registered: {self.alert_group.alerts.count()}, "
|
||||
f"{incident_link}\n"
|
||||
f"Your Grafana OnCall <3"
|
||||
f"Grafana OnCall: Alert group #{self.alert_group.inside_organization_number}"
|
||||
f'"{title}" from stack: "{self.alert_group.channel.organization.stack_slug}", '
|
||||
f"integration: {self.alert_group.channel.short_name}, "
|
||||
f"alerts registered: {self.alert_group.alerts.count()}."
|
||||
)
|
||||
|
|
|
|||
|
|
@ -45,8 +45,9 @@ export const commonTemplateForEdit: { [id: string]: TemplateForEdit } = {
|
|||
},
|
||||
sms_title_template: {
|
||||
name: TemplateOptions.SMS.key,
|
||||
displayName: 'SMS title',
|
||||
description: '',
|
||||
displayName: 'Sms title',
|
||||
description:
|
||||
"Result of this template will be used as title of SMS message. Please don't include any urls, or phone numbers, to avoid SMS message being blocked by carriers.",
|
||||
type: 'plain',
|
||||
},
|
||||
phone_call_title_template: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue