mirror of
https://github.com/caronc/apprise.git
synced 2024-11-29 03:24:18 +01:00
AWS SNS PhoneNumber parameter bugfix (#502)
This commit is contained in:
parent
5bf89aeefc
commit
c06a2f3f87
@ -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],
|
||||
)]),
|
||||
|
Loading…
Reference in New Issue
Block a user