Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use port in Mattermost only if defined
When we generate a MM notification URL with default port: >>> NotifyMattermost(token="secret", host="chat.example.com", port=443, secure=True).url() 'mmosts://chat.example.com/secret/?image=no&format=text&overflow=upstream' And then try to send it: ``` ac=Apprise() ac.add(NotifyMattermost(token="secret", host="chat.example.com", port=443, secure=True).url()) ac.notify("testing") ``` It fails. In debug logs we can see: `DEBUG:apprise:Mattermost POST URL: https://chat.example.com:None/hooks/secret (cert_verify=True)` Port is always included in the POST url, but if port matches default value for given "secret" we might not have it defined. So let's only include port in Mattermost URL if not None
- Loading branch information