Skip to content

Commit

Permalink
Added fallback behaviour for pkg category in Teams and Slack webhook …
Browse files Browse the repository at this point in the history
…delivery (fixes grahampugh#111)
  • Loading branch information
jc0b committed Oct 21, 2024
1 parent d296e68 commit bb91cfd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions JamfUploaderProcessors/JamfUploaderSlacker.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ def main(self):
slack_channel = self.env.get("slack_channel") or ""
slack_icon_emoji = self.env.get("slack_icon_emoji") or ""

if (not category and jamfpackageuploader_summary_result):
category = jamfpackageuploader_summary_result["data"]["category"]

selfservice_policy_name = name
self.output(f"JSS address: {jss_url}")
self.output(f"Title: {selfservice_policy_name}")
Expand Down
3 changes: 3 additions & 0 deletions JamfUploaderProcessors/JamfUploaderTeamsNotifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ def main(self):
"jamfpolicyuploader_summary_result"
)

if (not category and jamfpackageuploader_summary_result):
category = jamfpackageuploader_summary_result["data"]["category"]

teams_webhook_url = self.env.get("teams_webhook_url")
teams_username = self.env.get("teams_username")
teams_icon_url = (
Expand Down

0 comments on commit bb91cfd

Please sign in to comment.