Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fallback behaviour for pkg category in Teams and Slack webhook delivery (fixes #111) #175

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jc0b
Copy link
Contributor

@jc0b jc0b commented Oct 21, 2024

In the Teams postprocessor, the package category is only passed into the embed via the APP_CATEGORY variable, which seems to need to be explicitly set, and doesn't appear to be the output of any of the other JamfUploader processors.

This MR adds fallback behaviour where, if APP_CATEGORY is unset and a jamfpackageuploader_summary_result is present, an attempt is made to extract the package category from the jamfpackageuploader_summary_result. I have tested the JSON that the Teams postprocessor sends as a result of this change, and it now includes a category when jamfpackageuploader_summary_result contains one.

I also went over the Slack postprocessor (as I originally based the Teams one off of it), and at least at a glance it looks like it suffers from the same issue. I included the same fix in this postprocessor as well.

This should fix #111.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JamfUploaderTeamsNotifier category is empty
1 participant