Skip to content

Commit

Permalink
fix contact filter for v5 get messages (#4702)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mh-Asmi authored Jan 16, 2024
1 parent 8c53ba5 commit 7615477
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ private function setSearchCondition(MessageSearchFields $search_fields, $builder
// ["%" . $search_fields->q() . "%", "%" . $search_fields->q() . "%"]
// );
}
if ($search_fields->contact()) {
$builder->whereIn('messages.contact_id', $search_fields->contact());
}


if ($search_fields->box() === 'outbox') {
$builder->whereIn('messages.direction', ["outgoing"]);
Expand All @@ -53,7 +49,7 @@ private function setSearchCondition(MessageSearchFields $search_fields, $builder
}

if ($search_fields->contact()) {
$builder->whereIn('messages.contact_id', $search_fields->contact());
$builder->where('messages.contact_id', '=', $search_fields->contact());
}

if ($search_fields->type()) {
Expand Down

0 comments on commit 7615477

Please sign in to comment.