From c132bbf46e8b2eb2eca144a360de0ef59a2f50b0 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Thu, 7 Apr 2016 10:18:46 +0100 Subject: [PATCH] Rename NOTIFY_FROM_NUMBER to MMG_FROM_NUMBER, there should be a separate short code per provider. --- README.md | 2 ++ app/clients/sms/mmg.py | 2 +- config.py | 2 +- environment_test.sh | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3c5748e53..64c5ffb1b 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,8 @@ export SQLALCHEMY_DATABASE_URI = 'postgresql://localhost/notification_api' export TWILIO_ACCOUNT_SID=[contact team member for account sid] export TWILIO_AUTH_TOKEN=[contact team member for auth token] export VERIFY_CODE_FROM_EMAIL_ADDRESS='no-reply@notify.works' +export MMG_API_KEY=mmg=secret-key +export MMG_FROM_NUMBER="MMG "> environment.sh ``` diff --git a/app/clients/sms/mmg.py b/app/clients/sms/mmg.py index 687696055..c7f28b8a6 100644 --- a/app/clients/sms/mmg.py +++ b/app/clients/sms/mmg.py @@ -41,7 +41,7 @@ class MMGClient(SmsClient): def init_app(self, config, *args, **kwargs): super(SmsClient, self).__init__(*args, *kwargs) self.api_key = config.get('MMG_API_KEY') - self.from_number = config.get('NOTIFY_FROM_NUMBER') + self.from_number = config.get('MMG_FROM_NUMBER') self.name = 'MMG' def get_name(self): diff --git a/config.py b/config.py index 37533df1f..01d61ce5a 100644 --- a/config.py +++ b/config.py @@ -18,13 +18,13 @@ class Config(object): # Notification Queue names are a combination of a prefx plus a name NOTIFICATION_QUEUE_PREFIX = os.environ['NOTIFICATION_QUEUE_PREFIX'] MMG_API_KEY = os.environ['MMG_API_KEY'] + MMG_FROM_NUMBER = os.environ['MMG_FROM_NUMBER'] SECRET_KEY = os.environ['SECRET_KEY'] SQLALCHEMY_COMMIT_ON_TEARDOWN = False SQLALCHEMY_DATABASE_URI = os.environ['SQLALCHEMY_DATABASE_URI'] SQLALCHEMY_RECORD_QUERIES = True VERIFY_CODE_FROM_EMAIL_ADDRESS = os.environ['VERIFY_CODE_FROM_EMAIL_ADDRESS'] NOTIFY_EMAIL_DOMAIN = os.environ['NOTIFY_EMAIL_DOMAIN'] - NOTIFY_FROM_NUMBER = os.environ['NOTIFY_FROM_NUMBER'] PAGE_SIZE = 50 BROKER_URL = 'sqs://' diff --git a/environment_test.sh b/environment_test.sh index 1609eb92d..a4276d4c4 100644 --- a/environment_test.sh +++ b/environment_test.sh @@ -19,4 +19,4 @@ export FIRETEXT_API_KEY="Firetext" export FIRETEXT_NUMBER="Firetext" export NOTIFY_EMAIL_DOMAIN="test.notify.com" export MMG_API_KEY='mmg-secret-key' -export NOTIFY_FROM_NUMBER='test' \ No newline at end of file +export MMG_FROM_NUMBER='test' \ No newline at end of file