From cd417aaf44b13bae81c3538196531ccaa0c2d214 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sat, 24 Jun 2017 21:34:53 -0700 Subject: [PATCH] Support custom port for Mattermost (Slack) notifications --- plexpy/notifiers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plexpy/notifiers.py b/plexpy/notifiers.py index 508b1cec..6c724ecd 100644 --- a/plexpy/notifiers.py +++ b/plexpy/notifiers.py @@ -2062,9 +2062,10 @@ class SLACK(object): data['attachments'] = [attachment] slackhost = urlparse(self.slack_hook).hostname + slackport = urlparse(self.slack_hook).port slackpath = urlparse(self.slack_hook).path - http_handler = HTTPSConnection(slackhost) + http_handler = HTTPSConnection(slackhost, slackport) http_handler.request("POST", slackpath, headers={'Content-type': "application/json"},