Releases: musonza/chat
Releases · musonza/chat
v3.2.4
v3.2.3
v3.2.2
Added an extra orderBy in getConversationsList (#124) * Added an extra orderBy in getConversationsList Basically, this means: Order by `'mc_conversations.updated_at' desc` but whenever there are duplicated values for update_at then order those values by `'mc_conversations.id' desc.
v3.2.1
Creating a conversation of type private / public
$participants = [$userId, $userId2,...];
// Create a private conversation
$conversation = Chat::createConversation($participants)->makePrivate();
// Create a public conversation
$conversation = Chat::createConversation($participants)->makePrivate(false);
Get user conversations by type
// private conversations
$conversations = Chat::conversations()->for($user)->isPrivate()->get();
// public conversations
$conversations = Chat::conversations()->for($user)->isPrivate(false)->get();
// all conversations
$conversations = Chat::conversations()->for($user)->get();