diff --git a/projects/ucap-webmessenger-app/src/app/services/notification.service.ts b/projects/ucap-webmessenger-app/src/app/services/notification.service.ts index 24d23d61..bd44be2a 100644 --- a/projects/ucap-webmessenger-app/src/app/services/notification.service.ts +++ b/projects/ucap-webmessenger-app/src/app/services/notification.service.ts @@ -574,26 +574,29 @@ export class AppNotificationService { ); if (noti.userSeqs.indexOf(loginResInfo.userSeq) >= 0) { + // 강퇴 대상이 본인이면 열려 있는 대화방을 닫고, 대화리스트에서 삭제. this.store.dispatch( RoomStore.exitForcingNotification({ noti }) ); + } else { + // ROOM::열려 있는 대화방에서 강퇴 인원의 isJoinRoom = false 로 변경. + this.store.dispatch( + RoomStore.exitNotificationOthers({ + roomSeq: noti.roomSeq, + trgtUser: noti.userSeqs + }) + ); + + // SYNC::대화리스트의 대화자정보에서 강퇴 인원의 isJoinRoom = false 로 변경. + this.store.dispatch( + SyncStore.clearRoomUsers({ + roomSeq: noti.roomSeq, + userSeqs: noti.userSeqs + }) + ); } - - this.store.dispatch( - RoomStore.exitNotificationOthers({ - roomSeq: noti.roomSeq, - trgtUser: noti.userSeqs - }) - ); - - this.store.dispatch( - SyncStore.clearRoomUsers({ - roomSeq: noti.roomSeq, - userSeqs: noti.userSeqs - }) - ); } break; case SSVC_TYPE_ROOM_FONT_UPD_NOTI: diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts index b52dc94c..fc15f990 100644 --- a/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts +++ b/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts @@ -53,7 +53,8 @@ import { delBuddyAndClear, moveGroupMember, moveGroupFromFailure, - moveGroupToFailure + moveGroupToFailure, + clearRoomUsers } from './actions'; import { SessionStorageService } from '@ucap-webmessenger/web-storage'; import { LoginInfo, KEY_LOGIN_INFO } from '@app/types'; @@ -598,22 +599,37 @@ export class Effects { ) ), tap(([action, roomInfo, roomSyncDate]) => { - if (!!roomInfo && roomInfo.roomSeq === action.res.roomSeq) { - this.store.dispatch( - ChatStore.selectedRoom({ roomSeq: action.res.roomSeq }) - ); - } - - const loginInfo = this.sessionStorageService.get( - KEY_LOGIN_INFO - ); - + // ROOM::열려 있는 대화방에서 강퇴 인원의 isJoinRoom = false 로 변경. this.store.dispatch( - room({ - syncDate: roomSyncDate, - localeCode: loginInfo.localeCode + RoomStore.exitNotificationOthers({ + roomSeq: action.res.roomSeq, + trgtUser: action.res.userSeqs }) ); + + // SYNC::대화리스트의 대화자정보에서 강퇴 인원의 isJoinRoom = false 로 변경. + this.store.dispatch( + clearRoomUsers({ + roomSeq: action.res.roomSeq, + userSeqs: action.res.userSeqs + }) + ); + // if (!!roomInfo && roomInfo.roomSeq === action.res.roomSeq) { + // this.store.dispatch( + // ChatStore.selectedRoom({ roomSeq: action.res.roomSeq }) + // ); + // } + + // const loginInfo = this.sessionStorageService.get( + // KEY_LOGIN_INFO + // ); + + // this.store.dispatch( + // room({ + // syncDate: roomSyncDate, + // localeCode: loginInfo.localeCode + // }) + // ); }) ); }, @@ -631,9 +647,11 @@ export class Effects { ), tap(([action, roomInfo]) => { if (!!roomInfo && roomInfo.roomSeq === action.noti.roomSeq) { + // 열려 있는 대화방을 닫음. this.store.dispatch(ChatStore.clearSelectedRoom()); } + // sync.roomList 에서 방 삭제. this.store.dispatch( RoomStore.exitSuccess({ res: {