wingbot-mongodb 3.1.1 → 3.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wingbot-mongodb",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "description": "MongoDB storage for wingbot.ai",
5
5
  "main": "src/main.js",
6
6
  "scripts": {
@@ -8,6 +8,7 @@ const defaultLogger = require('./defaultLogger');
8
8
 
9
9
  const PAGE_SENDER_TIMESTAMP = 'pageId_1_senderId_1_timestamp_-1';
10
10
  const TIMESTAMP = 'timestamp_1';
11
+ const SENDER = 'senderId_1';
11
12
 
12
13
  /** @typedef {import('mongodb').Db} Db */
13
14
 
@@ -43,6 +44,12 @@ class ChatLogStorage extends BaseStorage {
43
44
  }, {
44
45
  name: TIMESTAMP
45
46
  });
47
+
48
+ this.addIndex({
49
+ senderId: 1
50
+ }, {
51
+ name: SENDER
52
+ });
46
53
  }
47
54
 
48
55
  this.muteErrors = true;