Skip to content

Commit 5e52d21

Browse files
committed
fix(ocm): format notifications
Signed-off-by: Maxence Lange <[email protected]>
1 parent d907a77 commit 5e52d21

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

apps/federatedfilesharing/lib/Notifications.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,10 @@ protected function tryLegacyEndPoint($remoteDomain, $urlSuffix, array $fields) {
359359
* @return array|false
360360
*/
361361
protected function tryOCMEndPoint($remoteDomain, $fields, $action) {
362+
if (str_starts_with($remoteDomain, 'https://')) {
363+
$remoteDomain = substr($remoteDomain, 8);
364+
}
365+
362366
switch ($action) {
363367
case 'share':
364368
$share = $this->cloudFederationFactory->getCloudFederationShare(

lib/private/Federation/CloudFederationNotification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function setMessage($notificationType, $resourceType, $providerId, array
3232
$this->message = [
3333
'notificationType' => $notificationType,
3434
'resourceType' => $resourceType,
35-
'providerId' => $providerId,
35+
'providerId' => (string)$providerId,
3636
'notification' => $notification,
3737
];
3838
}

lib/private/Federation/CloudFederationShare.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function setDescription($description) {
124124
* @since 14.0.0
125125
*/
126126
public function setProviderId($providerId) {
127-
$this->share['providerId'] = $providerId;
127+
$this->share['providerId'] = (string)$providerId;
128128
}
129129

130130
/**

0 commit comments

Comments
 (0)