Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

Fix Ping Method for using the default org_id and project_id (#2590)

Saket Aryan6d13e8300143
diff --git a/docs/changelog.mdx b/docs/changelog.mdx
index efb4246a7..b27bb6238 100644
--- a/docs/changelog.mdx
+++ b/docs/changelog.mdx
@@ -207,6 +207,11 @@ mode: "wide"
<Tab title="TypeScript">
+<Update label="2025-04-28" description="v2.1.20">
+**Improvements:**
+- **Client:** Fixed `organizationId` and `projectId` being asssigned to default in `ping` method
+</Update>
+
<Update label="2025-04-22" description="v2.1.19">
**Improvements:**
- **Client:** Added support for `timestamps`
diff --git a/mem0-ts/package.json b/mem0-ts/package.json
index 0035212eb..b7c0aa003 100644
--- a/mem0-ts/package.json
+++ b/mem0-ts/package.json
@@ -1,6 +1,6 @@
{
"name": "mem0ai",
- "version": "2.1.19",
+ "version": "2.1.20",
"description": "The Memory Layer For Your AI Apps",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
diff --git a/mem0-ts/src/client/mem0.ts b/mem0-ts/src/client/mem0.ts
index 82a4c59f5..9268e3b57 100644
--- a/mem0-ts/src/client/mem0.ts
+++ b/mem0-ts/src/client/mem0.ts
@@ -193,8 +193,8 @@ export default class MemoryClient {
const { org_id, project_id, user_email } = data;
- this.organizationId = org_id || null;
- this.projectId = project_id || null;
+ this.organizationId = this.organizationId || org_id || null;
+ this.projectId = this.projectId || project_id || null;
this.telemetryId = user_email || "";
}