Rank 1: Thread
I am experiencing an issue with the users.*.update trigger function. I've noticed that the payload data provided in the trigger event is inconsistent, particularly when different types of user information are updated.
When an email update occurs, the payload contains the full user object.
"x-appwrite-event": "users.656ae11125ca984676a9.update", { "$id": "656ae11125ca984676a9", "$createdAt": "2023-12-02T07:47:29.156+00:00", "$updatedAt": "2023-12-02T18:52:15.750+00:00", "name": "", "password": "$argon2id$v=19$m=65536,t=4,p=3$b0NuckhpMHVPRGtOWmFCUA$BG97mP3AIwRfjNS3NoaRqT+vS0e8ITsG8q8MLSY2zGk", "hash": "argon2", "hashOptions": { "type": "argon2", "memoryCost": 2048, "timeCost": 4, "threads": 3 }, "registration": "2023-12-02T07:47:29.155+00:00", "status": true, "labels": [], "passwordUpdate": "2023-12-02T07:47:29.155+00:00", "email": "admin123@test.com", "phone": "", "emailVerification": false, "phoneVerification": false, "prefs": { "test": "value" }, "accessedAt": "2023-12-02T07:47:29.155+00:00" }...Conversely, when a user preference is updated, the payload only contains the preference object, not the full user object.
"x-appwrite-event": "users.656ae11125ca984676a9.update",{ "body": { "test": "value", "test2": "val2" }, ...}