(Update) Chatbox System

- port over can_chat permission
This commit is contained in:
HDVinnie
2018-11-02 21:38:41 -04:00
parent 2865928e8e
commit a9cc47ec39

View File

@@ -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) {