Skip to content

Non participants can get all conversation list #330

@hellodit

Description

@hellodit

Hi Musonza, the package you created is very useful. I can easily create public or private chats, thank you so much for your help.

Currently, I want to create a page that contains a list of public chats, where a user who is not yet a member can view the list. The principle is quite similar to public groups on Telegram. How can I implement this feature?

currenly we have this

$conversations = \Chat::conversations()
            ->setPaginationParams(['sorting' => 'desc'])
            ->setParticipant(Auth::user())
            ->isPrivate(false)
            ->limit($request->limit ?? 10)
            ->page($request->page ?? 1)
            ->get();

i wonder how if we can get the conversation like this

$conversations = \Chat::conversations()
            ->setPaginationParams(['sorting' => 'desc'])
            ->isPrivate(false)
            ->limit($request->limit ?? 10)
            ->page($request->page ?? 1)
            ->get();

without setParticipant we can get all public conversation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions