From 3480c9c1cba7dafd660133b59f4bd06a7e035ffd Mon Sep 17 00:00:00 2001 From: JM Date: Tue, 5 May 2026 17:05:59 +0200 Subject: [PATCH] mal wieder ganz anders --- src/Support/NotificationPayloadFactory.php | 32 +++++----------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/src/Support/NotificationPayloadFactory.php b/src/Support/NotificationPayloadFactory.php index 01f5e8b..d8ea3bd 100644 --- a/src/Support/NotificationPayloadFactory.php +++ b/src/Support/NotificationPayloadFactory.php @@ -48,33 +48,16 @@ class NotificationPayloadFactory // 'postLiked' => 'Your post has been liked', // default => 'New sbp forum update', // }; - $discussionTitle = 'Backup-Strategie für Forum'; - $discussionUrl = 'https://forum.sbp.de/d/34-which-file-extensions-are-allowed-for-uploads/2'; - $previewSnippet = 'Bitte prüft, ob wir tägliche Snapshots brauchen.'; - $reasonText = 'Neue Antwort in beobachteter Diskussion'; - - // ✅ Teams AppCatalog ID (aus Get-TeamsApp) - $teamsCatalogAppId = '61e3fb91-4b17-428f-856b-51a345e10f06'; - - // ✅ kompakte Unterseiten-ID (KEINE URL!) - $subEntityId = 'discussion:34:2'; - - // ✅ Kontext für entityUrl - $contextJson = json_encode([ - 'subEntityId' => $subEntityId - ], JSON_UNESCAPED_SLASHES); - - // ✅ entityUrl (KEIN webUrl, KEIN Deep Link) - $entityUrl = sprintf( - 'https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/%s?context=%s', - rawurlencode($teamsCatalogAppId), - rawurlencode($contextJson) - ); + $discussionTitle = 'Backup-Strategie für Forum'; + $discussionUrl = 'https://forum.sbp.de/d/34-which-file-extensions-are-allowed-for-uploads/2'; + $previewSnippet = 'Bitte prüft, ob wir tägliche Snapshots brauchen.'; + $reasonText = 'Neue Antwort in beobachteter Diskussion'; $payload = [ 'topic' => [ - 'source' => 'entityUrl', - 'value' => $entityUrl, + 'source' => 'text', + 'value' => $discussionTitle, + 'webUrl' => $discussionUrl, // ✅ DIREKT ins Forum ], 'activityType' => 'systemDefault', 'previewText' => [ @@ -88,7 +71,6 @@ class NotificationPayloadFactory ], ]; - if ($iconId !== '') { $payload['iconId'] = $iconId; }