mirror of https://github.com/caronc/apprise
webexteams to support token= parameter arg
parent
dee70fb39e
commit
b2818d44e1
|
@ -242,8 +242,14 @@ class NotifyWebexTeams(NotifyBase):
|
|||
# We're done early as we couldn't load the results
|
||||
return results
|
||||
|
||||
# The first token is stored in the hostname
|
||||
results['token'] = NotifyWebexTeams.unquote(results['host'])
|
||||
# Set our token if found as an argument
|
||||
if 'token' in results['qsd'] and len(results['qsd']['token']):
|
||||
results['token'] = \
|
||||
NotifyWebexTeams.unquote(results['qsd']['token'])
|
||||
|
||||
else:
|
||||
# The first token is stored in the hostname
|
||||
results['token'] = NotifyWebexTeams.unquote(results['host'])
|
||||
|
||||
return results
|
||||
|
||||
|
|
|
@ -53,6 +53,13 @@ apprise_url_tests = (
|
|||
# Our expected url(privacy=True) startswith() response:
|
||||
'privacy_url': 'wxteams://a...a/',
|
||||
}),
|
||||
('wxteams://?token={}'.format('a' * 80), {
|
||||
# token provided - we're good
|
||||
'instance': NotifyWebexTeams,
|
||||
|
||||
# Our expected url(privacy=True) startswith() response:
|
||||
'privacy_url': 'wxteams://a...a/',
|
||||
}),
|
||||
('webex://{}'.format('a' * 140), {
|
||||
# token provided - we're good
|
||||
'instance': NotifyWebexTeams,
|
||||
|
|
Loading…
Reference in New Issue