@dhyasama/totem-models 8.34.0 → 8.35.0
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/lib/Message.js +4 -3
- package/package.json +1 -1
- package/test/Message.js +1 -0
package/lib/Message.js
CHANGED
|
@@ -19,6 +19,7 @@ module.exports = function(mongoose, config) {
|
|
|
19
19
|
subtype: { type: String, required: true, enum: ['boards', 'updates', 'deals', 'portfolio'] },
|
|
20
20
|
customer: { type: Schema.ObjectId, ref: 'Organization', required: true },
|
|
21
21
|
organization: { type: Schema.ObjectId, ref: 'Organization' },
|
|
22
|
+
processed: { type: Boolean, default: false },
|
|
22
23
|
originalMessageDate: { type: Date, required: false, default: null },
|
|
23
24
|
subject: { type: String, required: false, default: null, trim: true },
|
|
24
25
|
body: { type: String, required: false, default: null, trim: true },
|
|
@@ -319,7 +320,7 @@ module.exports = function(mongoose, config) {
|
|
|
319
320
|
let query = self.find({
|
|
320
321
|
customer: customerId,
|
|
321
322
|
subtype: 'deals',
|
|
322
|
-
|
|
323
|
+
processed: { $ne: true }
|
|
323
324
|
});
|
|
324
325
|
query.populate({
|
|
325
326
|
path: 'documents',
|
|
@@ -336,7 +337,7 @@ module.exports = function(mongoose, config) {
|
|
|
336
337
|
let query = self.find({
|
|
337
338
|
customer: customerId,
|
|
338
339
|
subtype: 'portfolio',
|
|
339
|
-
|
|
340
|
+
processed: { $ne: true }
|
|
340
341
|
});
|
|
341
342
|
query.populate({
|
|
342
343
|
path: 'documents',
|
|
@@ -387,4 +388,4 @@ module.exports = function(mongoose, config) {
|
|
|
387
388
|
|
|
388
389
|
mongoose.model('Message', Message);
|
|
389
390
|
|
|
390
|
-
};
|
|
391
|
+
};
|
package/package.json
CHANGED