@antzsoft/chat-core 1.2.9 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -152,13 +152,7 @@ module.exports = __toCommonJS(src_exports);
152
152
 
153
153
  // src/config/types.ts
154
154
  function resolveConfig(config) {
155
- const socketUrl = config.socketUrl ?? (() => {
156
- try {
157
- return new URL(config.apiUrl).origin;
158
- } catch {
159
- return config.apiUrl;
160
- }
161
- })();
155
+ const socketUrl = config.socketUrl ?? config.apiUrl.replace(/\/api\/v\d+\/?$/, "").replace(/\/$/, "");
162
156
  let socketOrigin = socketUrl;
163
157
  let socketPath = "/socket.io";
164
158
  try {