mirror of
https://github.com/caronc/apprise.git
synced 2025-02-16 10:19:50 +01:00
Eliminate Slack webhook token restrictions (#219)
This commit is contained in:
parent
44905e5c6e
commit
3895ad9b58
@ -176,7 +176,7 @@ class NotifySlack(NotifyBase):
|
||||
'type': 'string',
|
||||
'private': True,
|
||||
'required': True,
|
||||
'regex': (r'^[A-Z0-9]{9}$', 'i'),
|
||||
'regex': (r'^[A-Z0-9]+$', 'i'),
|
||||
},
|
||||
# Token required as part of the Webhook request
|
||||
# /........./BBBBBBBBB/........................
|
||||
@ -185,7 +185,7 @@ class NotifySlack(NotifyBase):
|
||||
'type': 'string',
|
||||
'private': True,
|
||||
'required': True,
|
||||
'regex': (r'^[A-Z0-9]{9}$', 'i'),
|
||||
'regex': (r'^[A-Z0-9]+$', 'i'),
|
||||
},
|
||||
# Token required as part of the Webhook request
|
||||
# /........./........./CCCCCCCCCCCCCCCCCCCCCCCC
|
||||
@ -194,7 +194,7 @@ class NotifySlack(NotifyBase):
|
||||
'type': 'string',
|
||||
'private': True,
|
||||
'required': True,
|
||||
'regex': (r'^[A-Za-z0-9]{24}$', 'i'),
|
||||
'regex': (r'^[A-Za-z0-9]+$', 'i'),
|
||||
},
|
||||
'target_encoded_id': {
|
||||
'name': _('Target Encoded ID'),
|
||||
|
@ -3213,15 +3213,15 @@ TEST_URLS = (
|
||||
'message': '',
|
||||
},
|
||||
}),
|
||||
('slack://username@INVALID/A1BRTD4JD/TIiajkdnlazkcOXrIdevi7FQ/#cool', {
|
||||
('slack://username@-INVALID-/A1BRTD4JD/TIiajkdnlazkcOXrIdevi7FQ/#cool', {
|
||||
# invalid 1st Token
|
||||
'instance': TypeError,
|
||||
}),
|
||||
('slack://username@T1JJ3T3L2/INVALID/TIiajkdnlazkcOXrIdevi7FQ/#great', {
|
||||
('slack://username@T1JJ3T3L2/-INVALID-/TIiajkdnlazkcOXrIdevi7FQ/#great', {
|
||||
# invalid 2rd Token
|
||||
'instance': TypeError,
|
||||
}),
|
||||
('slack://username@T1JJ3T3L2/A1BRTD4JD/INVALID/#channel', {
|
||||
('slack://username@T1JJ3T3L2/A1BRTD4JD/-INVALID-/#channel', {
|
||||
# invalid 3rd Token
|
||||
'instance': TypeError,
|
||||
}),
|
||||
|
Loading…
Reference in New Issue
Block a user