대화방 진입시 대화참여자 프레즌스 조회 로직 개선. >> 내 프레즌스 조회 제외, 현재 방 참여인원만 조회.
This commit is contained in:
parent
9269906f35
commit
d219226aa3
|
@ -39,6 +39,7 @@ import { of } from 'rxjs';
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||||
import { KEY_LOGIN_RES_INFO } from '@app/types';
|
import { KEY_LOGIN_RES_INFO } from '@app/types';
|
||||||
|
import { RoomType } from '@ucap-webmessenger/protocol-room';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Effects {
|
export class Effects {
|
||||||
|
@ -159,15 +160,36 @@ export class Effects {
|
||||||
() =>
|
() =>
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(RoomStore.infoSuccess),
|
ofType(RoomStore.infoSuccess),
|
||||||
map(action => action.userInfoList),
|
// map(action => action.userInfoList),
|
||||||
tap(userInfoList => {
|
tap(action => {
|
||||||
if (!!userInfoList && userInfoList.length > 0) {
|
if (
|
||||||
this.store.dispatch(
|
!!action.userInfoList &&
|
||||||
bulkInfo({
|
action.userInfoList.length > 0 &&
|
||||||
divCd: 'roomuserBulk',
|
(action.roomInfo.roomType === RoomType.Single ||
|
||||||
userSeqs: userInfoList.map(userinfo => userinfo.seq)
|
action.roomInfo.roomType === RoomType.Multi)
|
||||||
})
|
) {
|
||||||
);
|
let userSeqs = action.userInfoList
|
||||||
|
.filter(userInfo => userInfo.isJoinRoom)
|
||||||
|
.map(userinfo => userinfo.seq);
|
||||||
|
|
||||||
|
// ignore my state.
|
||||||
|
const loginResInfo: LoginResponse = this.sessionStorageService.get<
|
||||||
|
LoginResponse
|
||||||
|
>(KEY_LOGIN_RES_INFO);
|
||||||
|
if (!!loginResInfo) {
|
||||||
|
userSeqs = userSeqs.filter(
|
||||||
|
userSeq => userSeq !== loginResInfo.userSeq
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!!userSeqs && userSeqs.length > 0) {
|
||||||
|
this.store.dispatch(
|
||||||
|
bulkInfo({
|
||||||
|
divCd: 'roomuserBulk',
|
||||||
|
userSeqs
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user