webexteams to support token= parameter arg

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,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'])

View File

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