As per comment in MA-2542:
We don't need the users dictionary in case of PATCH calls, and the client end should handle this case by itself i.e. using the already fetched users dictionary.
Incase of POST, we should store the logged in user's profile info and show the picture accordingly (if available).
Its mentioned in comments on ticket https://openedx.atlassian.net/browse/MA-2542.
https://openedx.atlassian.net/browse/MA-2542 is a server-side ticket that we never implemented.so iOS would not have been able to implemented in said way.
Could you confirm?
Can you post a follow up on my previous comment/question?
for iOS we were not handling this issue properly, and suggested that instead of changing the code in the API, we'll fetch the user's information from server. But later on after discussion on Khalid's PR we decided not to call the user's information from server, instead use the existing user information that we have in the app.
This ticket is just to make sure we use existing user information in case of creating a new post.
had some concerns that there might be a time when user information API won't work properly because of internet connection, then we won't have user data to create a new post. (although this is very rare, but we wanted to handle each corner case). To tackle this issue we decided that if we don't have user data then call the user profile API before creating a new post. because either way, we need to have logged in user data in the app. By doing so, we'll have the user data for the next post or other operations.
Verified.