Skip to content

Commit

Permalink
Fix sending outbox FlagMessages
Browse files Browse the repository at this point in the history
- make 'id' and make it a valid url so the signature checks don't fail
  • Loading branch information
BentiGorlich committed Nov 11, 2023
1 parent f225b21 commit c89eab8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MessageHandler/ActivityPub/Outbox/FlagHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private function build(Report $report, string $objectUrl): array

return [
'@context' => $context,
'id' => $this->settingsManager->get('KBIN_DOMAIN').'/activities/reports/'.sha1('report'.microtime()),
'id' => 'https://' . $this->settingsManager->get('KBIN_DOMAIN').'/activities/reports/' . $report->getId(),
'type' => 'Flag',
'actor' => $report->reporting->apPublicUrl ?? $this->urlGenerator->generate('ap_user', ['username' => $report->reporting->username], UrlGeneratorInterface::ABSOLUTE_URL),
'to' => [$report->magazine->apPublicUrl ?? $this->urlGenerator->generate('ap_magazine', ['name' => $report->magazine->name], UrlGeneratorInterface::ABSOLUTE_URL)],
Expand Down

0 comments on commit c89eab8

Please sign in to comment.