I have mobile and web app with stream chat. I call connectUser method on mobile and pass userInfo with imageURL. The user avatar starts showing up on the web, but as soon as I close the mobile app or minimize it, the avatar disappears.
FYI: image is stored in backend.
Mobile app is opened
Mobile app is closed or minimized
let userInfo = UserInfo(id: userID, name: userName, imageURL: URL(string: userService.getLocalUser()?.avatar ?? ""))
return Promise { resolver in
self.chatClient.connectUser(userInfo: userInfo, tokenProvider: tokenProvider(_:)) { error in
if let error = error {
resolver.reject(error)
} else {
resolver.fulfill(())
}
}
}
I pass userInfo with imageURL and call connectUser with image in it. I expect the avatar to set permanently, not only when user online. Any ideas what i’m doing wrong?