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.
- package/dist/index.js +3 -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 {
|
|
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,
|