mirror of
https://github.com/caronc/apprise.git
synced 2024-11-25 09:33:50 +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):
|
for target in parse_list(targets):
|
||||||
result = is_phone_no(target)
|
result = is_phone_no(target)
|
||||||
if result:
|
if result:
|
||||||
# store valid phone number
|
# store valid phone number in E.164 format
|
||||||
self.phone.append('+{}'.format(result))
|
self.phone.append('+{}'.format(result['full']))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
result = IS_TOPIC.match(target)
|
result = IS_TOPIC.match(target)
|
||||||
@ -585,8 +585,8 @@ class NotifySNS(NotifyBase):
|
|||||||
region=NotifySNS.quote(self.aws_region_name, safe=''),
|
region=NotifySNS.quote(self.aws_region_name, safe=''),
|
||||||
targets='/'.join(
|
targets='/'.join(
|
||||||
[NotifySNS.quote(x) for x in chain(
|
[NotifySNS.quote(x) for x in chain(
|
||||||
# Phone # are prefixed with a plus symbol
|
# Phone # are already prefixed with a plus symbol
|
||||||
['+{}'.format(x) for x in self.phone],
|
self.phone,
|
||||||
# Topics are prefixed with a pound/hashtag symbol
|
# Topics are prefixed with a pound/hashtag symbol
|
||||||
['#{}'.format(x) for x in self.topics],
|
['#{}'.format(x) for x in self.topics],
|
||||||
)]),
|
)]),
|
||||||
|
Loading…
Reference in New Issue
Block a user