mirror of https://github.com/caronc/apprise
webexteams to support token= parameter arg
parent
dee70fb39e
commit
b2818d44e1
|
@ -242,6 +242,12 @@ class NotifyWebexTeams(NotifyBase):
|
||||||
# We're done early as we couldn't load the results
|
# We're done early as we couldn't load the results
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
# 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
|
# The first token is stored in the hostname
|
||||||
results['token'] = NotifyWebexTeams.unquote(results['host'])
|
results['token'] = NotifyWebexTeams.unquote(results['host'])
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,13 @@ apprise_url_tests = (
|
||||||
# Our expected url(privacy=True) startswith() response:
|
# Our expected url(privacy=True) startswith() response:
|
||||||
'privacy_url': 'wxteams://a...a/',
|
'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), {
|
('webex://{}'.format('a' * 140), {
|
||||||
# token provided - we're good
|
# token provided - we're good
|
||||||
'instance': NotifyWebexTeams,
|
'instance': NotifyWebexTeams,
|
||||||
|
|
Loading…
Reference in New Issue