[lib] Add extractUserIDsFromPayload
Summary:
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.
Test Plan:
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).
Reviewers: tomek, kamil, bartek
Reviewed By: tomek
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D11984