@optimiser/common 1.0.260 → 1.0.261

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.
@@ -106,7 +106,8 @@ var SyncContactWithOperaOnEmailUnsubscribe = function (db, email) {
106
106
  OperaErrorHandler(db, err);
107
107
  }
108
108
  else if (result && result.Setting && result.Setting.AppsSubscribed && result.Setting.AppsSubscribed.indexOf(constants_1.default.STORE_APP_NAMES.OPERA_PMS) >= 0) {
109
- db.collection("Contact").findOne({ Email: new RegExp("^" + email + "$", "i"), "IsActive": true }, { projection: { "_id": 1, "OperaProfileId": 1 } }, function (errContact, resultContact) {
109
+ /*Update By Suraj on 11Mar2022, $or condition added for searching Contact by Secondary Email as well */
110
+ db.collection("Contact").findOne({ $or: [{ Email: new RegExp("^" + email + "$", "i") }, { SecondaryEmail: new RegExp("^" + email + "$", "i") }], "IsActive": true }, { projection: { "_id": 1, "OperaProfileId": 1 } }, function (errContact, resultContact) {
110
111
  if (errContact) {
111
112
  if (errContact.name)
112
113
  errContact.name += " - while fetching contact to update contact opera sync flag";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optimiser/common",
3
- "version": "1.0.260",
3
+ "version": "1.0.261",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {