Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/webhook_listeners/lib/BackgroundJobs/WebhookCall.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ protected function run($argument): void {
} elseif (!$exApp['enabled']) {
throw new RuntimeException('ExApp ' . $exAppId . ' is disabled.');
}
$response = $appApiFunctions->exAppRequest($exAppId, $webhookUri, $webhookListener->getUserId(), $webhookListener->getHttpMethod(), [], $options);
$userId = ($data['user'] ?? [])['uid'] ?? null;
$response = $appApiFunctions->exAppRequest($exAppId, $webhookUri, $userId, $webhookListener->getHttpMethod(), [], $options);
if (is_array($response) && isset($response['error'])) {
throw new RuntimeException(sprintf('Error during request to ExApp(%s): %s', $exAppId, $response['error']));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function handle(Event $event): void {
// TODO add group membership to be able to filter on it
$data = [
'event' => $this->serializeEvent($event),
/* Do not remove 'user' from here, see BackgroundJobs/WebhookCall.php */
'user' => (is_null($user) ? null : JsonSerializer::serializeUser($user)),
'time' => time(),
];
Expand Down
Loading