Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non participants can get all conversation list #330

Open
hellodit opened this issue Jan 19, 2025 · 0 comments
Open

Non participants can get all conversation list #330

hellodit opened this issue Jan 19, 2025 · 0 comments

Comments

@hellodit
Copy link

hellodit commented Jan 19, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant