Skip to content

fix(users): include full user payload in account prefs event - #14037

Open
Neemasree wants to merge 1 commit into
appwrite:mainfrom
Neemasree:fix/7234-update-prefs-event-payload
Open

Neemasree wants to merge 1 commit into
appwrite:mainfrom
Neemasree:fix/7234-update-prefs-event-payload

Conversation

@Neemasree

Copy link
Copy Markdown

What does this PR do?

Fixes #7234 by making the users.[userId].update.prefs event emitted by
PATCH /v1/account/prefs include the full updated user payload.

Root cause

The account preferences endpoint updated the user and set the userId
event parameter, but did not explicitly set the event payload.

This made the event payload inconsistent with other user update events.

Changes

  • Set the event payload using the updated user document.
  • Keep the HTTP response unchanged.

Test Plan

  • Verified that the change is limited to the account preferences event payload.
  • The API response format remains unchanged.

Related PRs and Issues

Fixes #7234

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@hansi-codes

hansi-codes Bot commented Oct 1, 2026

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The payload matches the existing account-event pattern, and existing webhook tests already assert the full account payload for preference updates.

The account preferences endpoint now explicitly sets the update event payload from the updated user document using the account response model. The user ID event parameter and HTTP response remain unchanged.

Verdict New comments Fixed Still open
💬 Commented 0 0 0

Note

@Neemasree does not have write access to this repository, so Hansi does not approve automatically. A maintainer can review and approve.

📂 Walkthrough · 1
File Change
app/controllers/api/account.php Explicitly populate the preferences update event with the serialized updated account.

Reviewed a5ea443 · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@hansi-codes hansi-codes Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Tier S · Looks good to merge. Summary

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

🐛 Bug Report: users.*.update trigger function - Inconsistent request payload

1 participant