[FIX] im_chat : search user method, split the sql query into 3 smaller