mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-01-21 19:40:47 -06:00
(Update) Chatbox System
- port over can_chat permission
This commit is contained in:
@@ -1,4 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author Poppabear
|
||||
*/
|
||||
|
||||
namespace App\Http\Controllers\API;
|
||||
|
||||
@@ -63,6 +73,10 @@ class ChatController extends Controller
|
||||
return response('error', 401);
|
||||
}
|
||||
|
||||
if ($this->auth->user()->can_chat === 0) {
|
||||
return response('error', 401);
|
||||
}
|
||||
|
||||
$message = $this->chat->message($user_id, $room_id, $message);
|
||||
|
||||
if (!$save) {
|
||||
|
||||
Reference in New Issue
Block a user