@mastra/mongodb 1.8.1-alpha.0 → 1.8.1

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.js CHANGED
@@ -12,7 +12,7 @@ import { saveScorePayloadSchema } from '@mastra/core/evals';
12
12
 
13
13
  // package.json
14
14
  var package_default = {
15
- version: "1.8.1-alpha.0"};
15
+ version: "1.8.1"};
16
16
  var MongoDBFilterTranslator = class extends BaseFilterTranslator {
17
17
  getSupportedOperators() {
18
18
  return {
@@ -5053,11 +5053,14 @@ var MemoryStorageMongoDB = class _MemoryStorageMongoDB extends MemoryStorage {
5053
5053
  );
5054
5054
  }
5055
5055
  }
5056
- async getThreadById({ threadId }) {
5056
+ async getThreadById({
5057
+ threadId,
5058
+ resourceId
5059
+ }) {
5057
5060
  try {
5058
5061
  const collection = await this.getCollection(TABLE_THREADS);
5059
5062
  const result = await collection.findOne({ id: threadId });
5060
- if (!result) {
5063
+ if (!result || resourceId !== void 0 && result.resourceId !== resourceId) {
5061
5064
  return null;
5062
5065
  }
5063
5066
  return {