@mastra/dynamodb 1.0.7-alpha.0 → 1.0.7-alpha.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
@@ -1559,11 +1559,14 @@ var MemoryStorageDynamoDB = class extends MemoryStorage {
1559
1559
  return direction === "DESC" ? -comparison : comparison;
1560
1560
  });
1561
1561
  }
1562
- async getThreadById({ threadId }) {
1563
- this.logger.debug("Getting thread by ID", { threadId });
1562
+ async getThreadById({
1563
+ threadId,
1564
+ resourceId
1565
+ }) {
1566
+ this.logger.debug("Getting thread by ID", { threadId, resourceId });
1564
1567
  try {
1565
1568
  const result = await this.service.entities.thread.get({ entity: "thread", id: threadId }).go();
1566
- if (!result.data) {
1569
+ if (!result.data || resourceId !== void 0 && result.data.resourceId !== resourceId) {
1567
1570
  return null;
1568
1571
  }
1569
1572
  const data = result.data;