fix: room converter errors out when converting livechat room closed by the visitor #35107
+12
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes (including videos or screenshots)
If the closer of a livechat room is the visitor, the
closedBy
property of the room will contain the visitor's id, not the user's - which crashed the conversion from app format to core format as the converter was always trying to fetch a user from the DB.The behavior now checks for the
closer
property to correctly assign the value to theclosedBy
property when converting back from the app.Issue(s)
Steps to test or reproduce
Further comments
Further changes will be done to types, however to make this a safely "backportable" PR, they will be done separately