@asgard-js/core 0.2.20 → 0.2.21

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.mjs CHANGED
@@ -1534,7 +1534,7 @@ class rr {
1534
1534
  }
1535
1535
  /**
1536
1536
  * 上傳檔案到 Blob API
1537
- * 根據 API 文件:/generic/ns/{namespace}/bot-provider/{bot_provider_name}/blob
1537
+ * 根據 API 文件:/ns/{namespace}/bot-provider/{bot_provider_name}/blob
1538
1538
  */
1539
1539
  async uploadFile(e, t) {
1540
1540
  const n = this.deriveBlobEndpoint();
@@ -1567,16 +1567,7 @@ class rr {
1567
1567
  if (!this.botProviderEndpoint && !this.endpoint)
1568
1568
  return null;
1569
1569
  let e = this.botProviderEndpoint;
1570
- if (!e && this.endpoint && (e = this.endpoint.replace("/message/sse", "")), !e)
1571
- return null;
1572
- if (e = e.replace(/\/+$/, ""), !e.includes("/generic/")) {
1573
- const t = e.match(/^(https?:\/\/[^/]+)(\/.*)/);
1574
- if (t) {
1575
- const [, n, o] = t;
1576
- e = `${n}/generic${o}`;
1577
- }
1578
- }
1579
- return `${e}/blob`;
1570
+ return !e && this.endpoint && (e = this.endpoint.replace("/message/sse", "")), e ? (e = e.replace(/\/+$/, ""), `${e}/blob`) : null;
1580
1571
  }
1581
1572
  }
1582
1573
  const b = [];