The Chat SDK stores it's own user object in Firbase. That means that if you already have your own user profiles, you will need to synchronize these with Chat SDK. Otherwise the incorrect avatar and name will show up in the chat.
To do this you can use the following code:
// Get the current user
User currentUser = ChatSDK.core().currentUser();
// Update their name and avatar
currentUser.setName("name");
currentUser.setAvatarURL("URL");
// Push that data to Firebase
ChatSDK.core().pushUser().subscribe(() -> {
// Handle success
}, throwable -> {
// Handle failure
});
Or you you can use the SimpleAPI
for convenience:
SimpleAPI.updateUser("name", "avatarURL");
The best time to run this code is after authentication and whenever the user updates their profile information.