@@ -39,7 +39,6 @@ import { emitSessionsChanged } from "./session-change-event.js";
3939import {
4040 isAgentMainSessionKey ,
4141 loadSessionsRuntimeModule ,
42- rejectWebchatSessionMutation ,
4342 requireSessionKey ,
4443 resolveGatewaySessionTargetFromKey ,
4544 resolveSessionWorkerPlacementPatchError ,
@@ -49,7 +48,7 @@ import type { GatewayRequestHandlers } from "./types.js";
4948import { assertValidParams } from "./validation.js" ;
5049
5150export const sessionMutationHandlers : GatewayRequestHandlers = {
52- "sessions.patch" : async ( { params, respond, context, client, isWebchatConnect } ) => {
51+ "sessions.patch" : async ( { params, respond, context, client } ) => {
5352 if ( ! assertValidParams ( params , validateSessionsPatchParams , "sessions.patch" , respond ) ) {
5453 return ;
5554 }
@@ -58,10 +57,6 @@ export const sessionMutationHandlers: GatewayRequestHandlers = {
5857 if ( ! key ) {
5958 return ;
6059 }
61- if ( rejectWebchatSessionMutation ( { action : "patch" , client, isWebchatConnect, respond } ) ) {
62- return ;
63- }
64-
6560 const cfg = context . getRuntimeConfig ( ) ;
6661 const requestedAgent = resolveRequestedGlobalAgentId ( cfg , key , p . agentId ) ;
6762 if ( ! requestedAgent . ok ) {
@@ -315,7 +310,7 @@ export const sessionMutationHandlers: GatewayRequestHandlers = {
315310 reason : "patch" ,
316311 } ) ;
317312 } ,
318- "sessions.pluginPatch" : async ( { params, respond, context, client, isWebchatConnect } ) => {
313+ "sessions.pluginPatch" : async ( { params, respond, context, client } ) => {
319314 if (
320315 ! assertValidParams ( params , validateSessionsPluginPatchParams , "sessions.pluginPatch" , respond )
321316 ) {
@@ -325,9 +320,6 @@ export const sessionMutationHandlers: GatewayRequestHandlers = {
325320 if ( ! key ) {
326321 return ;
327322 }
328- if ( rejectWebchatSessionMutation ( { action : "patch" , client, isWebchatConnect, respond } ) ) {
329- return ;
330- }
331323 const scopes = Array . isArray ( client ?. connect . scopes ) ? client . connect . scopes : [ ] ;
332324 if ( ! scopes . includes ( ADMIN_SCOPE ) ) {
333325 respond (
0 commit comments