Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

sending a message to a specific user directly #388

samialtaher started this conversation in General
Discussion options

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

You must be logged in to vote

Replies: 1 comment

Comment options

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

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /