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) => {
166166 * @return {Promise } resolves to the list of user details
167167 */
168168const getUsersByHandle = ( handles ) => {
169- const query = _ . map ( handles , ( handle ) => 'handle:' + handle ) . join ( ' OR ' ) ;
169+ const query = _ . map ( handles , ( handle ) => 'handle:" ' + handle . trim ( ) . replace ( '"' , '\\"' ) + '"' ) . join ( ' OR ' ) ;
170170 return M2m . getMachineToken ( config . AUTH0_CLIENT_ID , config . AUTH0_CLIENT_SECRET )
171171 . catch ( ( err ) => {
172172 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) {
8383 return [ ] ;
8484 }
8585 // 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 ' ) ;
8787 return yield searchUsersByQuery ( query ) ;
8888}
8989
You can’t perform that action at this time.
0 commit comments