botinabox 1.8.4 → 1.8.5

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1672,12 +1672,13 @@ var ChatPipeline = class {
1672
1672
  if (this.messageFilter && !this.messageFilter(msg)) return;
1673
1673
  if (await this.isDuplicate(msg)) return;
1674
1674
  const rawTs = msg.raw?.ts;
1675
- const threadTs = msg.threadId ?? rawTs ?? msg.id;
1676
1675
  const channelId = msg.account ?? "";
1676
+ const threadTs = msg.threadId ?? channelId ?? rawTs ?? msg.id;
1677
1677
  if (threadTs && channelId) {
1678
1678
  this.threadChannelMap.set(threadTs, channelId);
1679
1679
  }
1680
- const { messageId } = await this.messageStore.storeInbound(msg);
1680
+ const msgWithThread = { ...msg, threadId: threadTs };
1681
+ const { messageId } = await this.messageStore.storeInbound(msgWithThread);
1681
1682
  const userHistory = await this.messageStore.getUserHistory(
1682
1683
  msg.from,
1683
1684
  this.channel,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "botinabox",
3
- "version": "1.8.4",
3
+ "version": "1.8.5",
4
4
  "description": "Bot in a Box — framework for building multi-agent bots",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",