Skip to content

Commit

Permalink
Merge pull request #5056 from Countly/feedback-email
Browse files Browse the repository at this point in the history
[SER-1144] [star-rating] Enable email search for feedback
  • Loading branch information
kanwarujjaval authored Apr 5, 2024
2 parents eebfaf9 + c680b36 commit 09ba36e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/star-rating/api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,10 @@ function uploadFile(myfile, id, callback) {
query.device_id = params.qstring.device_id;
}
if (params.qstring.sSearch && params.qstring.sSearch !== "") {
query.comment = {"$regex": new RegExp(".*" + params.qstring.sSearch + ".*", 'i')};
query.$or = [
{ comment: {$regex: new RegExp(`.*${params.qstring.sSearch}.*`, 'i')} },
{ email: {$regex: new RegExp(`.*${params.qstring.sSearch}.*`, 'i')} },
];
}
if (params.qstring.iSortCol_0) {
try {
Expand Down

0 comments on commit 09ba36e

Please sign in to comment.