From c06a2f3f8756f74eaff9c70746182a654f0a7860 Mon Sep 17 00:00:00 2001 From: Ben Mayer <87669725+benmayer-maplarge@users.noreply.github.com> Date: Thu, 23 Dec 2021 15:47:57 -0600 Subject: [PATCH] AWS SNS PhoneNumber parameter bugfix (#502) --- apprise/plugins/NotifySNS.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apprise/plugins/NotifySNS.py b/apprise/plugins/NotifySNS.py index 1cb6ff97..8af0847a 100644 --- a/apprise/plugins/NotifySNS.py +++ b/apprise/plugins/NotifySNS.py @@ -209,8 +209,8 @@ class NotifySNS(NotifyBase): for target in parse_list(targets): result = is_phone_no(target) if result: - # store valid phone number - self.phone.append('+{}'.format(result)) + # store valid phone number in E.164 format + self.phone.append('+{}'.format(result['full'])) continue result = IS_TOPIC.match(target) @@ -585,8 +585,8 @@ class NotifySNS(NotifyBase): region=NotifySNS.quote(self.aws_region_name, safe=''), targets='/'.join( [NotifySNS.quote(x) for x in chain( - # Phone # are prefixed with a plus symbol - ['+{}'.format(x) for x in self.phone], + # Phone # are already prefixed with a plus symbol + self.phone, # Topics are prefixed with a pound/hashtag symbol ['#{}'.format(x) for x in self.topics], )]),