Send user-modified only to webhooks of relevant OAuth apps #93585
@ -147,11 +147,12 @@ def handle_modifications(sender, user: UserModel, **kwargs):
|
||||
app__in=user.bid_main_oauth2accesstoken.distinct().values_list('application', flat=True)
|
||||
)
|
||||
|
||||
if not hooks.count():
|
||||
hooks_count = hooks.count()
|
||||
if hooks_count == 0:
|
||||
log.info('Not sending modification of pk=%d to any webhooks', user.pk)
|
||||
return
|
||||
|
||||
log.info("Sending modification of pk=%d to %d webhooks", user.pk, len(hooks))
|
||||
log.info("Sending modification of pk=%d to %d webhooks", user.pk, hooks_count)
|
||||
|
||||
# Do our own JSON encoding so that we can compute the HMAC using the hook's secret.
|
||||
payload = {
|
||||
|
Loading…
Reference in New Issue
Block a user