Update User Avatar completed but the avatar URL always return NULL

I tried to update the avatar from example app downloaded from Github but once completed the avatar URL always null, there are 2 methods I used to retrieve the user’s avatar URL:

  1. EkoMessage.getData().getUser().getAvatarCustomUrl()
  2. EkoMessage.getData().getUser().getAvatar().getUrl(EkoImage.Size.SMALL)

Hi @hoang.nguyen92dn, thank you for the inquiry.

We’ve tried on the latest SDK version (EkoSDK 4.7.2), and it the avatar result was successfully updated to the user.

We’re using this function :
EkoClient.updateUser()
.avatar(ekoImage)
.build()
.update()

What’s the version that you’re experiencing the issue, and how’s your update a user’s avatar?

Thank you.

Hi :wave:

I tried to update the avatar from your example app on Github then retrieve the user’s avatar from my application to display the image but as I mentioned above, both methods don’t work for me.

Hi @hoang.nguyen92dn, may we ask a question?

Which version of SDK are you using?

Thank you.

FYI: The SDK version I am using on my application is 4.8.0. I also tried to downgrade to 4.7.2 but it still doesn’t work.

Me too, cause the same problem
the image URL from EkoMessage.getData().getUser().getAvatar().getUrl() always null.
but this case work fine

EkoClient.getCurrentUser().subscribe {
it.getAvatar()?.getUrl()
}

but I want to get avatar of the user from ekomessage too
I use the 4.7.2 version

Hi @hoang.nguyen92dn @naphat,

It happens to be an issue on our SDK, we will provide a fix in the next upcoming version.
For workaround you may use :

val userId = message.getUser().getUserId()
EkoClient.newUserRepository().getUser(userId)
.map { it.getAvatar().getUrl() }
.subscribe { avatarUrl →
//doSomething()
}

We apologize for any inconvenience. Thank you.

@amitysupport

thanks for your reply, I use the same code as my old version this used to be good but now it always 401 error

EkoClient.getCurrentUser().subscribe {
val picasso = Picasso.Builder(this).downloader(OkHttp3Downloader(ekoOkHttpClient)).build()
picasso.load(it.getAvatar()?.getUrl(EkoImage.Size.SMALL))
.into(profileImage)
}

Same here. I am using Glide and the app was able to display the images yesterday.

Hi @naphat @hoang.nguyen92dn ,

Noted the information and sorry for the inconvenience.
We’re working on the fix and update you again.

Thank you.