-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat(conversations): add filter args to conversation list with last message #1470
feat(conversations): add filter args to conversation list with last message #1470
Conversation
.into_boxed(); | ||
Ok(self.raw_query(|conn| query.load::<ConversationListItem>(conn))?) | ||
|
||
//question: do we need to do this always? if yes, we can put it in the main view query instead of here! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean is this flag always true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if it is, we can embed this in the main query.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be always false in the case of the view that you're building? Typically the query will only get the overlapping DM with the latest message, which I believe is what you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, what you're saying I can keep it like this, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to always filter out duplicate DMs. This section of code will filter out duplicates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will keep it like these to give the control to the sdk and the integrators.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So just for clarity by default the duplicate dms are filtered out correct? Or will it be required to do it on my end?
Summary:
In PR #1437, we added a new function to fetch conversations along with their last message. This replaces the old functions with the new query.
Also updated the list_conversations function to support filters.
#1181