File tree Expand file tree Collapse file tree 4 files changed +5
-4
lines changed
backend/node/src/services/user/services/users
frontend/src/app/features/search/hooks Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ import PasswordEncoder from "../../../../utils/password-encoder";
2828import assert from "assert" ;
2929import { localEventBus } from "../../../../core/platform/framework/pubsub" ;
3030import { ResourceEventsPayload } from "../../../../utils/types" ;
31- import { isNumber } from "lodash" ;
31+ import { isNumber , isString } from "lodash" ;
3232import { RealtimeSaved } from "../../../../core/platform/framework" ;
3333import { getUserRoom } from "../../realtime" ;
3434import NodeCache from "node-cache" ;
@@ -236,6 +236,7 @@ export class UserServiceImpl implements UsersService {
236236 }
237237
238238 async getCached ( pk : UserPrimaryKey ) : Promise < User > {
239+ if ( ! ( pk . id && isString ( pk . id ) ) ) return null ;
239240 if ( this . cache . has ( pk . id ) ) return this . cache . get < User > ( pk . id ) ;
240241 const entity = await this . get ( pk ) ;
241242 this . cache . set < User > ( pk . id , entity ) ;
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ export const useSearchChannels = () => {
5151 const [ searched , setSearched ] = useRecoilState ( SearchChannelsResultsState ( companyId ) ) ;
5252 const [ recent , setRecent ] = useRecoilState ( RecentChannelsState ( companyId ) ) ;
5353
54- const opt = { limit : 100 , company_id : companyId } ;
54+ const opt = { limit : 25 , company_id : companyId } ;
5555
5656 const refresh = async ( ) => {
5757 setLoading ( true ) ;
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export const useSearchMessagesFilesOrMedias = (mode: 'files' | 'medias') => {
4040
4141 const opt = _ . omitBy (
4242 {
43- limit : 100 ,
43+ limit : 25 ,
4444 is_file : mode === 'files' || undefined ,
4545 is_media : mode === 'medias' || undefined ,
4646 workspace_id : searchInput . workspaceId ,
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export const useSearchMessages = () => {
2525
2626 const opt = _ . omitBy (
2727 {
28- limit : 100 ,
28+ limit : 50 ,
2929 company_id : companyId ,
3030 workspace_id : searchInput . workspaceId ,
3131 channel_id : searchInput . channelId ,
You can’t perform that action at this time.
0 commit comments