Skip to content
Snippets Groups Projects
Verified Commit 9ef1e44a authored by Gaëtan Blond's avatar Gaëtan Blond
Browse files

Fixed mattermost posts url

parent c2a81a46
No related branches found
No related tags found
1 merge request!1Refactor and clean old code
Pipeline #98114 failed
[tool.poetry]
name = "updates-notifier"
version = "0.1.1"
version = "0.1.2"
description = "Notify software updates by using various fetchers and notifiers"
authors = ["Gaëtan Blond <gaetan@blond.tf>"]
license = "MIT"
......
......@@ -48,13 +48,12 @@ class MattermostNotifier(NotificationSender):
"channel_id": self.channel_id,
"message": "\n".join(map(MattermostNotifier._entry_to_message, entries)),
}
full_url = self._get_api_root() + "/posts"
logger.debug("Sending entries to mattermost server %s", self.mattermost_host)
try:
response = requests.post(
self.mattermost_host, json=req_data, headers=req_headers
)
response = requests.post(full_url, json=req_data, headers=req_headers)
except TypeError as err:
raise NotificationSenderError(
f"Could not serialize entries to Mattermost server {self.mattermost_host}: {err}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment