issue: ENG-7820
We want to extract all ids of users included in the server responses. We will use validators for this. convertObject run a DFS over provided data and outputValidator. When it encounters any of typesToConvert (in my case - tUserID) it calls the provided conversionFunction.
Details
Details
- Reviewers
tomek kamil bartek - Commits
- rCOMM49d91055c1e4: [lib] Add extractUserIDsFromPayload
Tested the function by calling it on the result of threadJoinResponder:
I had a community with members user1, user2, user3 , user4. I had a subchannel in this community with members user1 and user2. I made user4 join this subchannel. The function exctracted the ids of all user1, user2, user3 , user4 from the result. This is correct, because they were present in result.updatesResult.newUpdates[0].threadInfo.members (they all had a membership because they belong to the community).
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Looks good, letting others review as well.
Might be a good idea to add unit test to conversion-utils.test.js - I see there are tests for other functions in this file