-
-
Notifications
You must be signed in to change notification settings - Fork 521
sending a message to a specific user directly #388
-
First please know that i am not a developer, but can follow code and get by :)
I am using this package on my new site. However, I have groups of users, so the user will only see other users in their group to send messages to. This is working fine.
I also have a page listing all users in the network, and want a way to allow people to click a button (send message) to send a message to any user (even if not in their group).
Can someone please show me / guide me with an example - I am using Laravel 8
I tried something like a route/link like this: site.com/messages/create?recipient=ID - where ID is the user ID of the person to send a message to. But no variation would work.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
You can handle this a few different ways. In the examples here we list out any possible users/recipients to join a thread, and those get processed here
If you want a user to send a message to everyone in a group you could swap this out for logic to gather the user ids then pass it into $thread->addParticipant($userIds).
I hope that helps
Beta Was this translation helpful? Give feedback.