doch weburl!
This commit is contained in:
parent
8d0a6f835e
commit
2913b64648
|
|
@ -34,32 +34,37 @@ class NotificationPayloadFactory
|
||||||
$reasonText = 'Neue Antwort in beobachteter Diskussion';
|
$reasonText = 'Neue Antwort in beobachteter Diskussion';
|
||||||
|
|
||||||
|
|
||||||
|
$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-App-/Tab-Ziel aus deinem aktuellen Manifest
|
||||||
//$discussionTitle = $discussionTitle ?? 'Neue Diskussion';
|
|
||||||
//$discussionUrl = $discussionUrl ?? 'https://forum.sbp.de';
|
|
||||||
//$previewSnippet = $previewSnippet ?? 'Neue Aktivität in Flarum';
|
|
||||||
//$reasonText = $reasonText ?? 'Neue Antwort in beobachteter Diskussion';
|
|
||||||
|
|
||||||
// Teams-App-/Tab-Ziel aus deinem aktuellen Manifest:
|
|
||||||
$teamsManifestAppId = 'd92b1be6-ea92-46b1-bcb0-c08ffdd1a61a';
|
$teamsManifestAppId = 'd92b1be6-ea92-46b1-bcb0-c08ffdd1a61a';
|
||||||
$teamsEntityId = '8ffe419f-ca44-4627-a4b2-f223da2d07aa';
|
$teamsEntityId = '8ffe419f-ca44-4627-a4b2-f223da2d07aa';
|
||||||
|
|
||||||
// Deep Link auf den Personal Tab in Teams.
|
// Kontext für den Tab: die Diskussion wird in subPageId transportiert.
|
||||||
// webUrl ist der Fallback und zeigt direkt auf die Flarum-Diskussion.
|
// Microsoft dokumentiert page.subPageId als den Kontextwert für eine Unterseite.
|
||||||
|
$contextJson = json_encode([
|
||||||
|
'subPageId' => $discussionUrl,
|
||||||
|
], JSON_UNESCAPED_SLASHES);
|
||||||
|
|
||||||
|
// Deep Link auf den Personal Tab.
|
||||||
|
// webUrl ist der Fallback (z. B. Browser-Fallback), context transportiert die Diskussion.
|
||||||
$teamsDeepLink = sprintf(
|
$teamsDeepLink = sprintf(
|
||||||
'https://teams.microsoft.com/l/entity/%s/%s?webUrl=%s&label=%s',
|
'https://teams.microsoft.com/l/entity/%s/%s?webUrl=%s&label=%s&context=%s',
|
||||||
rawurlencode($teamsManifestAppId),
|
rawurlencode($teamsManifestAppId),
|
||||||
rawurlencode($teamsEntityId),
|
rawurlencode($teamsEntityId),
|
||||||
rawurlencode($discussionUrl),
|
rawurlencode($discussionUrl),
|
||||||
rawurlencode($discussionTitle)
|
rawurlencode($discussionTitle),
|
||||||
|
rawurlencode($contextJson)
|
||||||
);
|
);
|
||||||
|
|
||||||
$payload = [
|
$payload = [
|
||||||
'topic' => [
|
'topic' => [
|
||||||
'source' => 'text',
|
'source' => 'text',
|
||||||
'value' => $discussionTitle,
|
'value' => $discussionTitle,
|
||||||
'discussionUrl' => $teamsDeepLink,
|
'webUrl' => $teamsDeepLink,
|
||||||
],
|
],
|
||||||
'activityType' => 'systemDefault',
|
'activityType' => 'systemDefault',
|
||||||
'previewText' => [
|
'previewText' => [
|
||||||
|
|
@ -74,6 +79,7 @@ class NotificationPayloadFactory
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// if ($teamsAppId !== '') {
|
// if ($teamsAppId !== '') {
|
||||||
// $payload['teamsAppId'] = $teamsAppId;
|
// $payload['teamsAppId'] = $teamsAppId;
|
||||||
// }
|
// }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue