There was an error while loading. Please reload this page.
1 parent 57bc720 commit 04262c6Copy full SHA for 04262c6
app/Conversation.php
@@ -74,11 +74,10 @@ public function unreadMessage()
74
*/
75
public static function firstConversion($participant)
76
{
77
- return self::whereHas('users', function ($query) use ($participant) {
78
- $query->whereIn('id', [
79
- auth()->id(),
80
- $participant
81
- ]);
+ return self::whereHas('users', function ($query) {
+ $query->where('id', auth()->id());
+ })->whereHas('users', function ($query) use ($participant) {
+ $query->where('id', $participant);
82
})->first();
83
}
84
0 commit comments