-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: webhooks_listeners app: send direct requests to ExApps using AppAPI #46477
Conversation
$statusCode = $response->getStatusCode(); | ||
if ($statusCode >= 200 && $statusCode < 300) { | ||
$this->logger->debug('Webhook returned status code '.$statusCode, ['body' => $response->getBody()]); | ||
} else { | ||
$this->logger->warning('Webhook returned unexpected status code '.$statusCode, ['body' => $response->getBody()]); | ||
$this->logger->warning('Webhook(' . $webhookId . ') returned unexpected status code '.$statusCode, ['body' => $response->getBody()]); |
Check notice
Code scanning / Psalm
PossiblyInvalidMethodCall Note
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean and simple 👍
…xApps using AppAPI. Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
460723d
to
696ece2
Compare
Not finished yet, because... I'm waiting for this to be finalized on the server. The technology is very powerful, probably better than what happened with ExApp. It can also be used as a Nextcloud client, but the client must have administrator access. Some docs(and maybe article?) will come before NC30 release. Reference: nextcloud/server#46477 --------- Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
|
||
public function getAppId(): ?string { | ||
return $this->appId; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You do not need to add the method, it’s a DB entity there is a magic method for this already.
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Summary
Discussed at the last brainstorm on the WorkflowEngine project:
To improve performance, WebhookApp should directly call ExApp through the AppAPI function.
I made it happen if the webhook URL starts with "/" and the
appId
field is filled(this field is only filled if webhook is registered by the ExApp).Checklist