Skip to content
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

Disabled Events From WebApi #28

Open
mlohoar opened this issue Sep 7, 2022 · 1 comment
Open

Disabled Events From WebApi #28

mlohoar opened this issue Sep 7, 2022 · 1 comment

Comments

@mlohoar
Copy link

mlohoar commented Sep 7, 2022

I need webhooks not to be triggered by WebAPI rest calls as it'll cause a never ending loop of events with my remote system.
I put this in the handler as a short term fix:
if($_POST['ignorewebhooks']=='true')
{
return;
}
I use the MoodleRest PHP SDK so it's easy for me to add addition data to the API post, but it might be worth enabling other methods of the webhooks not being triggered?
client IP address?
bool value on the chosen event

Good work thanks

@mlohoar
Copy link
Author

mlohoar commented Sep 8, 2022

Correction:
if(isset($_GET['wsfunction']))
{
return;
}

as any additional parameters in the ws call trigger and error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant