@dhyasama/totem-models 11.60.0 → 11.61.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/Interaction.js +10 -1
- package/package.json +1 -1
package/lib/Interaction.js
CHANGED
|
@@ -155,7 +155,16 @@ module.exports = function(mongoose, config) {
|
|
|
155
155
|
if (!startTime) { return cb(new Error('startTime is required'), null); }
|
|
156
156
|
|
|
157
157
|
var self = this;
|
|
158
|
-
|
|
158
|
+
const strippedSummary = stripEmojis(summary);
|
|
159
|
+
|
|
160
|
+
// Find interactions where either the exact summary matches or the stripped summary matches
|
|
161
|
+
var query = self.find({
|
|
162
|
+
$or: [
|
|
163
|
+
{ summary: summary },
|
|
164
|
+
{ summary: { $regex: `^${strippedSummary}$`, $options: 'i' } }
|
|
165
|
+
],
|
|
166
|
+
startTime: new Date(startTime)
|
|
167
|
+
});
|
|
159
168
|
|
|
160
169
|
query.populate('attendees.internal');
|
|
161
170
|
query.populate('attendees.external');
|