@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.
Files changed (2) hide show
  1. package/lib/Interaction.js +10 -1
  2. package/package.json +1 -1
@@ -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
- var query = self.find({ summary: summary, startTime: new Date(startTime) });
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');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "11.60.0",
3
+ "version": "11.61.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",