Description:
When user doesn't have preferences, the REST API call https://rocket.chat/docs/developer-guides/rest-api/users/get-preferences/ fails with {"success":false,"error":"Cannot set property 'language' of undefined"}.
The problem is in this line:
|
preferences.language = user.language; |
There needs to be a guard there.