File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ const getUsersById = (ids) => {
166
166
* @return {Promise } resolves to the list of user details
167
167
*/
168
168
const getUsersByHandle = ( handles ) => {
169
- const query = _ . map ( handles , ( handle ) => 'handle:' + handle ) . join ( ' OR ' ) ;
169
+ const query = _ . map ( handles , ( handle ) => 'handle:" ' + handle . trim ( ) . replace ( '"' , '\\"' ) + '"' ) . join ( ' OR ' ) ;
170
170
return M2m . getMachineToken ( config . AUTH0_CLIENT_ID , config . AUTH0_CLIENT_SECRET )
171
171
. catch ( ( err ) => {
172
172
err . message = 'Error generating m2m token: ' + err . message ;
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ function* getUsersByHandles(handles) {
83
83
return [ ] ;
84
84
}
85
85
// use 'OR' to link the handle matches
86
- const query = _ . map ( handles , ( h ) => 'handle:"' + h . trim ( ) + '"' ) . join ( ' OR ' ) ;
86
+ const query = _ . map ( handles , ( h ) => 'handle:"' + h . trim ( ) . replace ( '"' , '\\"' ) + '"' ) . join ( ' OR ' ) ;
87
87
return yield searchUsersByQuery ( query ) ;
88
88
}
89
89
You can’t perform that action at this time.
0 commit comments