@@ -136,7 +136,7 @@ private function preparePayload(array $arguments): array
136136 */
137137 private function websocketLoop (Endpoint $ endpoint , array $ payload ): ?Output
138138 {
139- $ ws = $ this ->ws (self ::QUEUE_JOIN );
139+ $ ws = $ this ->ws (str_replace ( ' / ' , '' , $ this -> config -> api_prefix ). ' / ' . self ::QUEUE_JOIN );
140140
141141 while (true ) {
142142 $ data = $ ws ->receive ();
@@ -191,10 +191,10 @@ private function websocketLoop(Endpoint $endpoint, array $payload): ?Output
191191 private function sseLoop (Endpoint $ endpoint , array $ payload , string $ protocol , ?int $ triggerId ): ?Output
192192 {
193193 if ($ protocol === 'sse ' ) {
194- $ getEndpoint = self ::QUEUE_JOIN ;
194+ $ getEndpoint = str_replace ( ' / ' , '' , $ this -> config -> api_prefix ). ' / ' . self ::QUEUE_JOIN ;
195195 } else {
196- $ getEndpoint = self ::SSE_QUEUE_DATA ;
197- $ response = $ this ->httpRaw ('post ' , self ::QUEUE_JOIN , [
196+ $ getEndpoint = str_replace ( ' / ' , '' , $ this -> config -> api_prefix ). ' / ' . self ::SSE_QUEUE_DATA ;
197+ $ response = $ this ->httpRaw ('post ' , str_replace ( ' / ' , '' , $ this -> config -> api_prefix ). ' / ' . self ::QUEUE_JOIN , [
198198 'data ' => $ payload ,
199199 'fn_index ' => $ endpoint ->index ,
200200 'session_hash ' => $ this ->sessionHash ,
@@ -239,7 +239,7 @@ private function sseLoop(Endpoint $endpoint, array $payload, string $protocol, ?
239239 $ message = $ this ->hydrator ->hydrateWithJson (Message::class, $ buffer );
240240
241241 if ($ message instanceof SendData && $ protocol === 'sse ' ) {
242- $ sendData = $ this ->httpRaw ('post ' , self ::SSE_QUEUE_DATA , [
242+ $ sendData = $ this ->httpRaw ('post ' , str_replace ( ' / ' , '' , $ this -> config -> api_prefix ). ' / ' . self ::SSE_QUEUE_DATA , [
243243 'data ' => $ payload ,
244244 'fn_index ' => $ endpoint ->index ,
245245 'session_hash ' => $ this ->sessionHash ,
0 commit comments