Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android - Unable to get created by name & image info in QueriedCalls #1131

Open
vinodkumarsagitla opened this issue Jul 5, 2024 Discussed in #1130 · 4 comments
Open

Android - Unable to get created by name & image info in QueriedCalls #1131

vinodkumarsagitla opened this issue Jul 5, 2024 Discussed in #1130 · 4 comments
Labels
enhancement New feature or request

Comments

@vinodkumarsagitla
Copy link

Discussed in #1130

Originally posted by vinodkumarsagitla July 4, 2024
Hello,
I am using latest version "io.getstream:stream-video-android-ui-compose:1.0.9"
When we call below query for ongoing stream video

val filters = mutableMapOf("ongoing" to true)
val result = cloudClientStreamVideo?.queryCalls(filters=filters, limit=25, watch=true)?.getOrNull()

then i got below response in result so we are unable to get/find createdBy user name, image in this response

QueriedCalls(calls=[CallData(blockedUsersIds=[], call=CallInfo(cid=livestream:056cb8e9-2863-417e-acd8-8aa5c98c21ed, type=livestream, id=056cb8e9-2863-417e-acd8-8aa5c98c21ed, createdByUserId=vQkCQ72k57PLaWTL54Q3BUfHL9Z2, broadcastingEnabled=true, recordingEnabled=false, createdAt=Thu Jul 04 18:20:06 GMT+05:30 2024, updatedAt=Thu Jul 04 18:20:06 GMT+05:30 2024, custom={}), members=[], ownMembership=null)], next=null, prev=null)

So please can you help

@aleksandar-apostolov
Copy link
Collaborator

If you have cached users you can use the ID of the createdByUserId to find it in the DB. If not, you need to load the data for the call and extract the createdBy from there.

Something in the line of this:

val imageNamePair = StreamVideo.instance().call("livestream", "056cb8e9-2863-417e-acd8-8aa5c98c21ed")
                    .get()
                    .map {
                        it.call.createdBy
                    }.map {
                        val name = it.name
                        val image = it.image
                        Pair(name, image)
                    }.getOrNull()

Let me know if it works for you or if there is any way we can help you further.

@aleksandar-apostolov aleksandar-apostolov added the waiting for response Further information is requested label Jul 8, 2024
@vinodkumarsagitla
Copy link
Author

@aleksandar-apostolov Thanks for your suggestions.

But this is not a best solution for me because we have list of calls (for e.g 25 records) ( QueriedCalls(calls=[...], next=null, prev=null) ) then we need to make request multiple times(e.g. 25 times) for get values for each calls in list.

So please can you have any other way to get this data for multiple calls at single request

@github-actions github-actions bot removed the waiting for response Further information is requested label Jul 8, 2024
@vinodkumarsagitla
Copy link
Author

@aleksandar-apostolov Any update?

@aleksandar-apostolov aleksandar-apostolov added the enhancement New feature or request label Aug 7, 2024
@aleksandar-apostolov
Copy link
Collaborator

Hey @vinodkumarsagitla
Sorry for the delay in response, currently I see no other way to do it.
We will pick it up as a feature request, but this is low on our priority list.

Will keep you posted.

Regards,
Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants