diff --git a/configs/config.yaml b/configs/config.yaml index 9abfd740..e17d5ac2 100644 --- a/configs/config.yaml +++ b/configs/config.yaml @@ -230,5 +230,6 @@ require_auth: False # username: 'sAMAccountName' # full_name: 'displayName' # mail: 'mail' +# pushover: 'pushover' # mobile: 'mobile' # image_url: 'https://image.example.com/api/%s/picture' diff --git a/db/schema.v0.sql b/db/schema.v0.sql index 34614c36..cf5dda86 100644 --- a/db/schema.v0.sql +++ b/db/schema.v0.sql @@ -313,7 +313,7 @@ CREATE TABLE IF NOT EXISTS `contact_mode` ( -- Initialize contact modes -- ----------------------------------------------------- INSERT IGNORE INTO `contact_mode` (`name`) -VALUES ('email'), ('sms'), ('call'), ('slack'), ('teams_messenger'); +VALUES ('email'), ('sms'), ('call'), ('slack'), ('teams_messenger'), ('pushover'); -- ----------------------------------------------------- -- Table `user_contact` diff --git a/src/oncall/constants.py b/src/oncall/constants.py index 91bbb542..751a4d9c 100644 --- a/src/oncall/constants.py +++ b/src/oncall/constants.py @@ -5,6 +5,7 @@ SMS_SUPPORT = 'sms' CALL_SUPPORT = 'call' SLACK_SUPPORT = 'slack' +PUSHOVER_SUPPORT = 'pushover' ROCKET_SUPPORT = 'rocketchat' TEAMS_SUPPORT = 'teams_messenger' diff --git a/src/oncall/messengers/iris_messenger.py b/src/oncall/messengers/iris_messenger.py index 5791d75b..d8ac5839 100644 --- a/src/oncall/messengers/iris_messenger.py +++ b/src/oncall/messengers/iris_messenger.py @@ -2,12 +2,12 @@ # See LICENSE in the project root for license information. -from oncall.constants import EMAIL_SUPPORT, SMS_SUPPORT, CALL_SUPPORT, SLACK_SUPPORT +from oncall.constants import EMAIL_SUPPORT, SMS_SUPPORT, CALL_SUPPORT, SLACK_SUPPORT, PUSHOVER_SUPPORT from irisclient import IrisClient class iris_messenger(object): - supports = frozenset([EMAIL_SUPPORT, SMS_SUPPORT, CALL_SUPPORT, SLACK_SUPPORT]) + supports = frozenset([EMAIL_SUPPORT, SMS_SUPPORT, CALL_SUPPORT, SLACK_SUPPORT, PUSHOVER_SUPPORT]) def __init__(self, config): self.iris_client = IrisClient(config['application'], config['iris_api_key'], config['api_host']) diff --git a/src/oncall/ui/templates/index.html b/src/oncall/ui/templates/index.html index ec0bcafa..c4f9b48c 100644 --- a/src/oncall/ui/templates/index.html +++ b/src/oncall/ui/templates/index.html @@ -517,6 +517,7 @@