-
-
Save BrightnBubbly/e75cc20d7411c62ac25dd6cda54657aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use GetStream\StreamChat\Client as StreamClient; | |
protected function registered($user) | |
{ | |
$invite = Invite::firstWhere('email', $user->email); | |
$invite->accepted = true; | |
$invite->save(); | |
$client = new StreamClient( | |
env('MIX_STREAM_API_KEY'), | |
env('MIX_STREAM_API_SECRET'), | |
null, | |
null, | |
9 | |
); | |
$client->updateUser([ | |
'id' => $user->username, | |
'name' => $user->username, | |
]); | |
$channel = $client->Channel('messaging', 'Chatroom'); | |
$channel->addMembers([$user->username]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment