Skip to content

Commit 09ba36e

Browse files
Merge pull request #5056 from Countly/feedback-email
[SER-1144] [star-rating] Enable email search for feedback
2 parents eebfaf9 + c680b36 commit 09ba36e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugins/star-rating/api/api.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,10 @@ function uploadFile(myfile, id, callback) {
10411041
query.device_id = params.qstring.device_id;
10421042
}
10431043
if (params.qstring.sSearch && params.qstring.sSearch !== "") {
1044-
query.comment = {"$regex": new RegExp(".*" + params.qstring.sSearch + ".*", 'i')};
1044+
query.$or = [
1045+
{ comment: {$regex: new RegExp(`.*${params.qstring.sSearch}.*`, 'i')} },
1046+
{ email: {$regex: new RegExp(`.*${params.qstring.sSearch}.*`, 'i')} },
1047+
];
10451048
}
10461049
if (params.qstring.iSortCol_0) {
10471050
try {

0 commit comments

Comments
 (0)