added trigger for chat sms

This commit is contained in:
2026-08-04 18:59:38 +03:30
parent fab3c2270a
commit bfb8b91133
8 changed files with 245 additions and 5 deletions
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Customer;
use App\Http\Controllers\Controller;
use App\Models\Customer;
use App\Services\ChatWebhookService;
use Illuminate\Support\Facades\Http;
class ChatController extends Controller
@@ -26,6 +27,8 @@ class ChatController extends Controller
? (string) $user->chat_user_id
: 'user_'.$user->id;
app(ChatWebhookService::class)->ensureRegistered();
if (!empty($user->chat_room_id)) {
if ($this->chatRoomIsAccessible($host, (string) $chatApiKey, (string) $user->chat_room_id, $userChatId)) {
if (empty($user->chat_user_id) || $user->chat_user_id !== $userChatId) {