Open nplasterer opened 3 days ago
Great idea on the join table.
What's the problem with limit
?
if you ask for limit 1 of the list of groups and order by last message. Since ordering by last message currently happens on the sdk side and limit happens in the database you will get the first 10 items that were ordered by created at and then order them by last message. When in reality you want the last 10 items that are ordered by last message. Does that make sense?
Add a field on group for lastMessage
that gets written everytime. A new message is sent.
I do this in the sdks but it would be way more performant if I could do it in libxmtp and also allow limit to actually work correctly.