stream-chat-swift icon indicating copy to clipboard operation
stream-chat-swift copied to clipboard

ChatMessageSearchController.loadNextMessages fails for queries with a custom link type

Open AndrewSB opened this issue 1 year ago • 4 comments

What did you do?

var controller = chatClient.messageSearchController()

let query = MessageSearchQuery(
    channelFilter: .equal(.cid, to: channel.cid),
    messageFilter: .withAttachments([.linkPreview]),
    sort: [.init(key: .relevance, isAscending: false)],
    pageSize: 20
)

controller.search(query)

then later,

controller.loadNextPage()

What did you expect to happen?

we get more results

What happened instead?

the get stream server errors out Screen Shot 2022-08-08 at 1 32 53 PM

AndrewSB avatar Aug 08 '22 20:08 AndrewSB

Hi @AndrewSB,

Thanks for your report. I'm reviewing the issue with the team and will get back to you soon with an answer.

Regards, Hugo

hugobernalstream avatar Aug 09 '22 14:08 hugobernalstream

Hi @AndrewSB,

Could you try and do the message search without the sort: [.init(key: .relevance, isAscending: false)] parameter? we currently don't support it when loading following pages. We now have an internal ticket for tracking this issue down and add this missing functionality as soon as possible.

We'll update this issue once the functionality is released in a future version.

Regards, Hugo

hugobernalstream avatar Aug 09 '22 21:08 hugobernalstream

Hey Team, How's it going? Any updates on this issue. It's blocking the release of our media lists in chat which are becoming increasingly important as volume picks up. We'd really appreciate a solution here 🙏

jfru avatar Sep 08 '22 23:09 jfru

Hi @jfru!

We bumped the priority on this one, and we will start working on it next week.

The ETA for releasing this is about 2 weeks. But we will keep you posted!

Best, Nuno

nuno-vieira avatar Sep 09 '22 13:09 nuno-vieira

Hi Team. What's the latest on this PR?

jfru avatar Oct 05 '22 04:10 jfru

Hi @jfru, we had some items that got more priority over this one, so unfortunately the implementation has not yet started. We will let you know when we start working on it.

polqf avatar Oct 05 '22 07:10 polqf

Guys, I'm sorry for being blunt here, but this isn't good enough. This is a basic feature that is part of every other chat app. We opened this issue 2 month ago! We're a startup. We simply can't afford to wait this long for bog standard functionality. Please bump this up your priority list and get it out to us asap.

jfru avatar Oct 05 '22 18:10 jfru

Hi @jfru, we understand this is a feature for your app, but the iOS team at Stream has other priorities currently higher on our list. We have to prioritize issues that are the highest impact on our overall customer base. Can you please drop me an email, [email protected], and we can continue the discussion? Continuing to comment on these GH issues is not going to speed anything up or change our roadmap.

shodgetts avatar Oct 05 '22 19:10 shodgetts

Hi @jfru @AndrewSB!

The issue has been fixed in the 4.23.0 release! 🚀

Best, Nuno

nuno-vieira avatar Oct 27 '22 17:10 nuno-vieira

Great news! Thanks guys.

jfru avatar Oct 28 '22 23:10 jfru

hey @nuno-vieira. This feature now works fine, but I am still getting an error while it is working correctly. "Search failed with error: Cannot use offset pagination with sort values. Use the next parameter to paginate instead."

saidReclip avatar Nov 04 '22 05:11 saidReclip

Hi @saidReclip, when do you call this function? Can you show a snippet?

nuno-vieira avatar Nov 04 '22 13:11 nuno-vieira

@nuno-vieira when last item in array appears I call ChatMessageSearchController's func loadNextMessages and get this error. We get the error only when there is no next page.

saidReclip avatar Nov 07 '22 10:11 saidReclip

Hello @nuno-vieira! Did you have a chance to check it out?

saidReclip avatar Nov 17 '22 13:11 saidReclip

Hello @nuno-vieira! Did you have a chance to check it out?

No, not yet. Feel free to open a new issue. But since it is a logging issue, it will be low priority.

nuno-vieira avatar Nov 17 '22 13:11 nuno-vieira