Webhook non invia nulla quando email/username vengono aggiornati

As far as I understand, when we create a webhook for user events, it should send a webhook when user updated their email or username. I checked and I got nothing in payload when I changed a username. however if I change avatar, I get the webhook.
Am I doing somthing wrong? or its working as intended?

1 Mi Piace

Pretty sure no events are planned for name change or email change.

The feature to send webhook when username or email updates would be really helpful. I maintain an external mailing list and whenever a user signs up he/she is automatically added to that mailing list. Also, when the user account is deleted, the email is unsubscribed.

The problem arises when the user updates his/her email address because this doesn’t trigger the webhook. The workaround I have done is check for the username and email every time the user logs in and logs out and if there is any change the email will be updated. Obviously this is a huge wastage of resources and webhook in case of Name and Email update would be great.

1 Mi Piace

I dunno, what do you think @sam?

Sure I support adding a webhook for this, @vinothkannans maybe add to your list, low priority.

3 Mi Piace

Dobbiamo sincronizzare gli utenti di Discourse con Stripe, quindi avere un webhook che notifichi le modifiche all’indirizzo email sarebbe molto utile, in modo da poter aggiornare anche il cliente Stripe.

Speriamo che venga implementato presto.

2 Mi Piace

Ora le modifiche al nome utente attiveranno il webhook dell’utente. Presto includerò anche l’indirizzo email.

4 Mi Piace

E per quanto riguarda le diverse email primaria/secondaria? Spero includiate anche informazioni aggiuntive su quale esattamente sia stata modificata.

Inoltre, presumo che l’azione si attivi dopo la verifica dell’email?

2 Mi Piace

Ora le modifiche all’email dell’utente attiveranno i webhook. @gpetrov sì, verrà attivato solo dopo che l’email è stata verificata. E come tutti gli altri webhook, non includerà i dettagli su quale parte dei dati è stata modificata. Attiverà l’evento webhook user_updated con i dati dell’utente. Se hai già i valori precedenti, puoi capirlo confrontandoli.

2 Mi Piace

Ma questo mi sembra essenziale! Come dovremmo capire cosa è cambiato e intraprendere l’azione appropriata?

Ad esempio, ho bisogno di sincronizzare la modifica dell’email, ma per farlo devo conoscere l’email vecchia e quella nuova. Non posso semplicemente conservare una copia di tutte le vecchie email degli utenti e fare un confronto per ogni modifica…! Sarebbe troppo dispendioso in termini di tempo e risorse.

Forse dovresti prendere come esempio i webhook di Stripe, dove forniscono chiaramente informazioni su cosa è stato esattamente modificato e qual era il valore vecchio e quello nuovo.

Scusa, non è ancora previsto nella nostra roadmap. Potremmo accettarlo tramite una pull request.