Skip to content

Commit 04262c6

Browse files
committed
fix conversion create issue.
1 parent 57bc720 commit 04262c6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

app/Conversation.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,10 @@ public function unreadMessage()
7474
*/
7575
public static function firstConversion($participant)
7676
{
77-
return self::whereHas('users', function ($query) use ($participant) {
78-
$query->whereIn('id', [
79-
auth()->id(),
80-
$participant
81-
]);
77+
return self::whereHas('users', function ($query) {
78+
$query->where('id', auth()->id());
79+
})->whereHas('users', function ($query) use ($participant) {
80+
$query->where('id', $participant);
8281
})->first();
8382
}
8483

0 commit comments

Comments
 (0)