webexteams to support token= parameter arg

pull/1357/head
Chris Caron 2025-07-06 12:56:34 -04:00
parent dee70fb39e
commit b2818d44e1
2 changed files with 15 additions and 2 deletions

View File

@ -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

View File

@ -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,