From e0f928f0d923e046013d26449522f09464400829 Mon Sep 17 00:00:00 2001 From: Chris Caron Date: Tue, 7 Sep 2021 07:17:31 -0400 Subject: [PATCH] MS Teams url parsing token encoding support (#438) --- apprise/plugins/NotifyMSTeams.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apprise/plugins/NotifyMSTeams.py b/apprise/plugins/NotifyMSTeams.py index 3777cefb05..e69247124f 100644 --- a/apprise/plugins/NotifyMSTeams.py +++ b/apprise/plugins/NotifyMSTeams.py @@ -168,7 +168,7 @@ class NotifyMSTeams(NotifyBase): 'type': 'string', 'private': True, 'required': True, - 'regex': (r'^[A-Za-z0-9]+$', 'i'), + 'regex': (r'^[a-z0-9]+$', 'i'), }, # Token required as part of the API request # /........./........./CCCCCCCCCCCCCCCCCCCCCCCC @@ -177,7 +177,7 @@ class NotifyMSTeams(NotifyBase): 'type': 'string', 'private': True, 'required': True, - 'regex': (r'^[A-Z0-9-]+$', 'i'), + 'regex': (r'^[a-z0-9-]+$', 'i'), }, }) @@ -539,10 +539,13 @@ def parse_url(url): results['team'] = NotifyMSTeams.unquote(results['host']) # Get the token from the path - results['token_a'] = None if not entries else entries.pop(0) + results['token_a'] = None if not entries \ + else NotifyMSTeams.unquote(entries.pop(0)) - results['token_b'] = None if not entries else entries.pop(0) - results['token_c'] = None if not entries else entries.pop(0) + results['token_b'] = None if not entries \ + else NotifyMSTeams.unquote(entries.pop(0)) + results['token_c'] = None if not entries \ + else NotifyMSTeams.unquote(entries.pop(0)) # Get Image results['include_image'] = \