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

Fixed Microsoft Teams notifications #15809

Merged
merged 3 commits into from
Nov 13, 2024
Merged

Conversation

marcusmoore
Copy link
Collaborator

@marcusmoore marcusmoore commented Nov 13, 2024

Description

We currently have two ways to send webhooks to Microsoft Teams since one is being deprecated in the near future. This PR fixes a bug where we were accidentally not checking for which version should be used in the listener.

It also fixes a bug where the integrations page was not rendering.

Note: We don't have an old webhook to test with so we're going on prayers that the old version still works.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

@marcusmoore marcusmoore requested a review from snipe as a code owner November 13, 2024 22:31
Copy link

what-the-diff bot commented Nov 13, 2024

PR Summary

  • Refinement of Code Structure
    The CheckoutableListener.php file now incorporates a Str use statement for a more streamlined and efficient operation.

  • Improved Webhook Selection Process
    Optimization of Microsoft Teams webhook selection has been carried out. This includes replacing the old setting check with a new dedicated method - newMicrosoftTeamsWebhookEnabled(). This development was introduced for enhancing the readability of the code and making the content more manageable.

  • New Method Introduction
    The method newMicrosoftTeamsWebhookEnabled() was introduced to the CheckoutableListener.php file. This method takes over the responsibility of Microsoft Teams' webhook checks by analyzing the presence of 'workflows' in the webhook endpoint.

  • Change in Return Type Declaration
    The return type declaration of the toMicrosoftTeams() method within the CheckoutAssetNotification.php underwent alterations. It no longer contains hinting with an array, which suggests changes to the expected return format, potentially indicating increased flexibility or broader application.

@snipe snipe merged commit 5084843 into snipe:develop Nov 13, 2024
9 checks passed
@marcusmoore marcusmoore deleted the fixes/teams branch November 13, 2024 22:39
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.

2 participants