## 방정보.참여자 정보 수정.
1. isJoinRoom 값에 따른 화면별 처리. ## 강퇴기능 씽크 제반 작업. 1. 모바일 씽크작업. 2. 강퇴 메시지 처리. ## 사용자 초대 :: 1. 모바일과 씽크. 2. 초대시 방정보 갱신되지 않는 문제 수정.
This commit is contained in:
parent
39aaa78e4e
commit
2dcd0036d0
|
@ -84,11 +84,7 @@ import {
|
||||||
FileViewerDialogData,
|
FileViewerDialogData,
|
||||||
FileViewerDialogResult
|
FileViewerDialogResult
|
||||||
} from '@app/layouts/common/dialogs/file-viewer.dialog.component';
|
} from '@app/layouts/common/dialogs/file-viewer.dialog.component';
|
||||||
import {
|
import { CONST, FileUtil, StickerFilesInfo } from '@ucap-webmessenger/core';
|
||||||
CONST,
|
|
||||||
FileUtil,
|
|
||||||
StickerFilesInfo
|
|
||||||
} from '@ucap-webmessenger/core';
|
|
||||||
import { PerfectScrollbarComponent } from 'ngx-perfect-scrollbar';
|
import { PerfectScrollbarComponent } from 'ngx-perfect-scrollbar';
|
||||||
import { StatusCode } from '@ucap-webmessenger/api';
|
import { StatusCode } from '@ucap-webmessenger/api';
|
||||||
import {
|
import {
|
||||||
|
@ -311,7 +307,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
case RoomType.Bot:
|
case RoomType.Bot:
|
||||||
case RoomType.Allim:
|
case RoomType.Allim:
|
||||||
return this.userInfoList
|
return this.userInfoList
|
||||||
.filter(user => user.seq !== this.loginRes.userSeq)
|
.filter(user => user.seq !== this.loginRes.userSeq && user.isJoinRoom)
|
||||||
.map(user => user.name);
|
.map(user => user.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,7 +319,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
if (this.roomInfo.roomType === RoomType.Single) {
|
if (this.roomInfo.roomType === RoomType.Single) {
|
||||||
return user.seq !== this.loginRes.userSeq;
|
return user.seq !== this.loginRes.userSeq;
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return user.isJoinRoom;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0))
|
.sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0))
|
||||||
|
@ -959,15 +955,17 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
type: UserSelectDialogType.EditChatMember,
|
type: UserSelectDialogType.EditChatMember,
|
||||||
title: 'Edit Chat Member',
|
title: 'Edit Chat Member',
|
||||||
curRoomUser: this.userInfoList.filter(
|
curRoomUser: this.userInfoList.filter(
|
||||||
user => user.seq !== this.loginRes.userSeq
|
user => user.seq !== this.loginRes.userSeq && user.isJoinRoom
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!!result && !!result.choice && result.choice) {
|
if (!!result && !!result.choice && result.choice) {
|
||||||
const userSeqs: number[] = this.userInfoList.map(
|
const userSeqs: number[] = this.userInfoList.map(userInfo => {
|
||||||
userInfo => userInfo.seq
|
if (userInfo.isJoinRoom) {
|
||||||
);
|
return userInfo.seq;
|
||||||
|
}
|
||||||
|
});
|
||||||
if (
|
if (
|
||||||
!!result.selectedUserList &&
|
!!result.selectedUserList &&
|
||||||
result.selectedUserList.length > 0
|
result.selectedUserList.length > 0
|
||||||
|
|
|
@ -66,7 +66,9 @@ export class RoomUserListComponent implements OnInit, OnDestroy {
|
||||||
.pipe(
|
.pipe(
|
||||||
select(AppStore.MessengerSelector.RoomSelector.selectUserinfolist),
|
select(AppStore.MessengerSelector.RoomSelector.selectUserinfolist),
|
||||||
tap(userInfoList => {
|
tap(userInfoList => {
|
||||||
this.userInfoList = userInfoList;
|
this.userInfoList = userInfoList
|
||||||
|
.filter(userInfo => userInfo.isJoinRoom === true)
|
||||||
|
.sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0));
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
.subscribe();
|
.subscribe();
|
||||||
|
@ -104,15 +106,17 @@ export class RoomUserListComponent implements OnInit, OnDestroy {
|
||||||
type: UserSelectDialogType.EditChatMember,
|
type: UserSelectDialogType.EditChatMember,
|
||||||
title: 'Edit Chat Member',
|
title: 'Edit Chat Member',
|
||||||
curRoomUser: this.userInfoList.filter(
|
curRoomUser: this.userInfoList.filter(
|
||||||
user => user.seq !== this.loginRes.userSeq
|
user => user.seq !== this.loginRes.userSeq && user.isJoinRoom
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!!result && !!result.choice && result.choice) {
|
if (!!result && !!result.choice && result.choice) {
|
||||||
const userSeqs: number[] = this.userInfoList.map(
|
const userSeqs: number[] = this.userInfoList.map(userInfo => {
|
||||||
userInfo => userInfo.seq
|
if (userInfo.isJoinRoom) {
|
||||||
);
|
return userInfo.seq;
|
||||||
|
}
|
||||||
|
});
|
||||||
if (!!result.selectedUserList && result.selectedUserList.length > 0) {
|
if (!!result.selectedUserList && result.selectedUserList.length > 0) {
|
||||||
result.selectedUserList.forEach(user => {
|
result.selectedUserList.forEach(user => {
|
||||||
if (userSeqs.indexOf(user.seq) < 0) {
|
if (userSeqs.indexOf(user.seq) < 0) {
|
||||||
|
|
|
@ -37,7 +37,10 @@ import {
|
||||||
SSVC_TYPE_ROOM_FONT_UPD_NOTI,
|
SSVC_TYPE_ROOM_FONT_UPD_NOTI,
|
||||||
InviteNotification,
|
InviteNotification,
|
||||||
UpdateNotification as RoomUpdateNotification,
|
UpdateNotification as RoomUpdateNotification,
|
||||||
SSVC_TYPE_ROOM_UPD_RES
|
SSVC_TYPE_ROOM_UPD_RES,
|
||||||
|
SSVC_TYPE_ROOM_EXIT_FORCING_RES,
|
||||||
|
SSVC_TYPE_ROOM_EXIT_RES,
|
||||||
|
SSVC_TYPE_ROOM_INVITE_RES
|
||||||
} from '@ucap-webmessenger/protocol-room';
|
} from '@ucap-webmessenger/protocol-room';
|
||||||
import {
|
import {
|
||||||
StatusProtocolService,
|
StatusProtocolService,
|
||||||
|
@ -342,6 +345,20 @@ export class AppNotificationService {
|
||||||
.pipe(
|
.pipe(
|
||||||
tap(notiOrRes => {
|
tap(notiOrRes => {
|
||||||
switch (notiOrRes.SSVC_TYPE) {
|
switch (notiOrRes.SSVC_TYPE) {
|
||||||
|
case SSVC_TYPE_ROOM_INVITE_RES:
|
||||||
|
{
|
||||||
|
const noti = notiOrRes as InviteNotification;
|
||||||
|
this.logger.debug(
|
||||||
|
'Notification::roomProtocolService::InviteNotification',
|
||||||
|
noti
|
||||||
|
);
|
||||||
|
this.store.dispatch(
|
||||||
|
RoomStore.inviteSuccess({
|
||||||
|
roomSeq: noti.roomSeq
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case SSVC_TYPE_ROOM_UPD_RES:
|
case SSVC_TYPE_ROOM_UPD_RES:
|
||||||
{
|
{
|
||||||
const noti = notiOrRes as RoomUpdateNotification;
|
const noti = notiOrRes as RoomUpdateNotification;
|
||||||
|
@ -393,15 +410,31 @@ export class AppNotificationService {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SSVC_TYPE_ROOM_EXIT_FORCING_NOTI:
|
case SSVC_TYPE_ROOM_EXIT_FORCING_RES:
|
||||||
{
|
{
|
||||||
|
// 내가 강퇴 진행.
|
||||||
const noti = notiOrRes as ExitForcingNotification;
|
const noti = notiOrRes as ExitForcingNotification;
|
||||||
this.logger.debug(
|
this.logger.debug(
|
||||||
'Notification::roomProtocolService::ExitForcingNotification',
|
'Notification::roomProtocolService::ExitForcingNotification',
|
||||||
noti
|
noti
|
||||||
);
|
);
|
||||||
this.store.dispatch(
|
this.store.dispatch(
|
||||||
RoomStore.exitForcingNotification({
|
RoomStore.exitForcingNotificationRes({
|
||||||
|
noti
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SSVC_TYPE_ROOM_EXIT_FORCING_NOTI:
|
||||||
|
{
|
||||||
|
// 내가 강퇴 됨.
|
||||||
|
const noti = notiOrRes as ExitForcingNotification;
|
||||||
|
this.logger.debug(
|
||||||
|
'Notification::roomProtocolService::ExitForcingNotification',
|
||||||
|
noti
|
||||||
|
);
|
||||||
|
this.store.dispatch(
|
||||||
|
RoomStore.exitForcingNotificationNoti({
|
||||||
noti
|
noti
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
|
@ -52,8 +52,12 @@ export const exitNotification = createAction(
|
||||||
props<{ noti: ExitNotification }>()
|
props<{ noti: ExitNotification }>()
|
||||||
);
|
);
|
||||||
|
|
||||||
export const exitForcingNotification = createAction(
|
export const exitForcingNotificationRes = createAction(
|
||||||
'[Messenger::Room] Exit Forcing Notification',
|
'[Messenger::Room] Exit Forcing Notification // Do Forcing',
|
||||||
|
props<{ noti: ExitForcingNotification }>()
|
||||||
|
);
|
||||||
|
export const exitForcingNotificationNoti = createAction(
|
||||||
|
'[Messenger::Room] Exit Forcing Notification // Forcing Me',
|
||||||
props<{ noti: ExitForcingNotification }>()
|
props<{ noti: ExitForcingNotification }>()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,9 @@ import {
|
||||||
UpdateTimerSetResponse
|
UpdateTimerSetResponse
|
||||||
} from '@ucap-webmessenger/protocol-room';
|
} from '@ucap-webmessenger/protocol-room';
|
||||||
|
|
||||||
|
import * as AppStore from '@app/store';
|
||||||
import * as ChatStore from '@app/store/messenger/chat';
|
import * as ChatStore from '@app/store/messenger/chat';
|
||||||
|
import * as SyncStore from '@app/store/messenger/sync';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
info,
|
info,
|
||||||
|
@ -44,7 +46,8 @@ import {
|
||||||
infoFailure,
|
infoFailure,
|
||||||
inviteNotification,
|
inviteNotification,
|
||||||
exitNotification,
|
exitNotification,
|
||||||
exitForcingNotification,
|
exitForcingNotificationRes,
|
||||||
|
exitForcingNotificationNoti,
|
||||||
updateFontNotification,
|
updateFontNotification,
|
||||||
updateOnlyAlarm,
|
updateOnlyAlarm,
|
||||||
update,
|
update,
|
||||||
|
@ -266,16 +269,29 @@ export class Effects {
|
||||||
inviteSuccess$ = createEffect(() =>
|
inviteSuccess$ = createEffect(() =>
|
||||||
this.actions$.pipe(
|
this.actions$.pipe(
|
||||||
ofType(inviteSuccess),
|
ofType(inviteSuccess),
|
||||||
map(action => {
|
withLatestFrom(
|
||||||
return ChatStore.selectedRoom({ roomSeq: action.roomSeq });
|
this.store.pipe(
|
||||||
// const loginInfo = this.sessionStorageService.get<LoginInfo>(
|
select((state: any) => state.messenger.room.roomInfo as RoomInfo)
|
||||||
// KEY_LOGIN_INFO
|
),
|
||||||
// );
|
this.store.pipe(
|
||||||
// return info({
|
select(AppStore.MessengerSelector.SyncSelector.selectRoomSyncDate)
|
||||||
// roomSeq: action.roomSeq,
|
)
|
||||||
// isDetail: true,
|
),
|
||||||
// localeCode: loginInfo.localeCode
|
map(([action, roomInfo, roomSyncDate]) => {
|
||||||
// });
|
const loginInfo = this.sessionStorageService.get<LoginInfo>(
|
||||||
|
KEY_LOGIN_INFO
|
||||||
|
);
|
||||||
|
|
||||||
|
this.store.dispatch(
|
||||||
|
SyncStore.room({
|
||||||
|
syncDate: roomSyncDate,
|
||||||
|
localeCode: loginInfo.localeCode
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!!roomInfo && roomInfo.roomSeq === action.roomSeq) {
|
||||||
|
return ChatStore.selectedRoom({ roomSeq: action.roomSeq });
|
||||||
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -338,16 +354,67 @@ export class Effects {
|
||||||
},
|
},
|
||||||
{ dispatch: false }
|
{ dispatch: false }
|
||||||
);
|
);
|
||||||
exitForcingNotification$ = createEffect(
|
exitForcingNotificationRes$ = createEffect(
|
||||||
() => {
|
() => {
|
||||||
return this.actions$.pipe(
|
return this.actions$.pipe(
|
||||||
ofType(exitForcingNotification),
|
ofType(exitForcingNotificationRes),
|
||||||
map(action => action.noti),
|
withLatestFrom(
|
||||||
tap(noti => {})
|
this.store.pipe(
|
||||||
|
select((state: any) => state.messenger.room.roomInfo as RoomInfo)
|
||||||
|
),
|
||||||
|
this.store.pipe(
|
||||||
|
select(AppStore.MessengerSelector.SyncSelector.selectRoomSyncDate)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
tap(([action, roomInfo, roomSyncDate]) => {
|
||||||
|
if (!!roomInfo && roomInfo.roomSeq === action.noti.roomSeq) {
|
||||||
|
this.store.dispatch(
|
||||||
|
ChatStore.selectedRoom({ roomSeq: action.noti.roomSeq })
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const loginInfo = this.sessionStorageService.get<LoginInfo>(
|
||||||
|
KEY_LOGIN_INFO
|
||||||
|
);
|
||||||
|
|
||||||
|
this.store.dispatch(
|
||||||
|
SyncStore.room({
|
||||||
|
syncDate: roomSyncDate,
|
||||||
|
localeCode: loginInfo.localeCode
|
||||||
|
})
|
||||||
|
);
|
||||||
|
})
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
{ dispatch: false }
|
{ dispatch: false }
|
||||||
);
|
);
|
||||||
|
exitForcingNotificationNoti$ = createEffect(
|
||||||
|
() => {
|
||||||
|
return this.actions$.pipe(
|
||||||
|
ofType(exitForcingNotificationNoti),
|
||||||
|
withLatestFrom(
|
||||||
|
this.store.pipe(
|
||||||
|
select((state: any) => state.messenger.room.roomInfo as RoomInfo)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
tap(([action, roomInfo]) => {
|
||||||
|
if (!!roomInfo && roomInfo.roomSeq === action.noti.roomSeq) {
|
||||||
|
this.store.dispatch(ChatStore.clearSelectedRoom());
|
||||||
|
}
|
||||||
|
|
||||||
|
this.store.dispatch(
|
||||||
|
exitSuccess({
|
||||||
|
res: {
|
||||||
|
roomSeq: action.noti.roomSeq
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
})
|
||||||
|
);
|
||||||
|
},
|
||||||
|
{ dispatch: false }
|
||||||
|
);
|
||||||
|
|
||||||
updateFontNotification$ = createEffect(
|
updateFontNotification$ = createEffect(
|
||||||
() => {
|
() => {
|
||||||
return this.actions$.pipe(
|
return this.actions$.pipe(
|
||||||
|
|
|
@ -15,6 +15,8 @@ export interface Info<T = {}> {
|
||||||
sentMessageJson?: T;
|
sentMessageJson?: T;
|
||||||
// 수신자수
|
// 수신자수
|
||||||
receiverCount: number;
|
receiverCount: number;
|
||||||
|
// 강퇴 요청자명
|
||||||
|
exitForcingRequestUserName?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isCopyable(eventType: EventType): boolean {
|
export function isCopyable(eventType: EventType): boolean {
|
||||||
|
|
|
@ -107,7 +107,7 @@ export const decodeEventJson = (
|
||||||
case EventType.Before2MonthsAgo:
|
case EventType.Before2MonthsAgo:
|
||||||
return message;
|
return message;
|
||||||
case EventType.ForcedExit:
|
case EventType.ForcedExit:
|
||||||
return message;
|
return decodeCharacterEventJson(message);
|
||||||
case EventType.ChatbotStart:
|
case EventType.ChatbotStart:
|
||||||
return message;
|
return message;
|
||||||
case EventType.ChatbotEnd:
|
case EventType.ChatbotEnd:
|
||||||
|
|
|
@ -60,6 +60,8 @@ export const decodeInfoData: ProtocolDecoder<InfoData> = (
|
||||||
if (info.length > 5) {
|
if (info.length > 5) {
|
||||||
const eventType = info[1] as EventType;
|
const eventType = info[1] as EventType;
|
||||||
|
|
||||||
|
const exitForcingRequestUserName = info.length > 6 ? info[6] : '';
|
||||||
|
|
||||||
infoList.push({
|
infoList.push({
|
||||||
seq: Number(info[0]),
|
seq: Number(info[0]),
|
||||||
type: eventType,
|
type: eventType,
|
||||||
|
@ -67,7 +69,8 @@ export const decodeInfoData: ProtocolDecoder<InfoData> = (
|
||||||
sendDate: info[3],
|
sendDate: info[3],
|
||||||
sentMessage: info[4],
|
sentMessage: info[4],
|
||||||
sentMessageJson: decodeEventJson(eventType, info[4]),
|
sentMessageJson: decodeEventJson(eventType, info[4]),
|
||||||
receiverCount: Number(info[5])
|
receiverCount: Number(info[5]),
|
||||||
|
exitForcingRequestUserName
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ export interface SendResponse extends ProtocolResponse {
|
||||||
// 알림상태(s) PC 경우에만 관여됨 N: 푸시를 보내지 않은 이벤트 S: 푸시를 보낸 이벤트
|
// 알림상태(s) PC 경우에만 관여됨 N: 푸시를 보내지 않은 이벤트 S: 푸시를 보낸 이벤트
|
||||||
pushStatus: PushStatus;
|
pushStatus: PushStatus;
|
||||||
// 강퇴 타입(s)
|
// 강퇴 타입(s)
|
||||||
ForcedExitType: string;
|
forcedExitType: string;
|
||||||
// 요청자 이름(s)
|
// 요청자 이름(s)
|
||||||
senderName: string;
|
senderName: string;
|
||||||
/** Decoded Info */
|
/** Decoded Info */
|
||||||
|
@ -63,7 +63,7 @@ export interface SendNotification extends ProtocolNotification {
|
||||||
/** 알림상태(s) PC 경우에만 관여됨 N: 푸시를 보내지 않은 이벤트 S: 푸시를 보낸 이벤트 */
|
/** 알림상태(s) PC 경우에만 관여됨 N: 푸시를 보내지 않은 이벤트 S: 푸시를 보낸 이벤트 */
|
||||||
pushStatus: PushStatus;
|
pushStatus: PushStatus;
|
||||||
/** 강퇴 타입(s) */
|
/** 강퇴 타입(s) */
|
||||||
ForcedExitType: string;
|
forcedExitType: string;
|
||||||
/** 요청자 이름(s) */
|
/** 요청자 이름(s) */
|
||||||
senderName: string;
|
senderName: string;
|
||||||
/** 사용자아이디(s) */
|
/** 사용자아이디(s) */
|
||||||
|
@ -94,6 +94,8 @@ export const decodeSend: ProtocolDecoder<SendResponse> = (
|
||||||
const sendDate = message.bodyList[3];
|
const sendDate = message.bodyList[3];
|
||||||
const sentMessage = message.bodyList[4];
|
const sentMessage = message.bodyList[4];
|
||||||
const receiverCount = message.bodyList[5] || 0;
|
const receiverCount = message.bodyList[5] || 0;
|
||||||
|
const forcedExitType = message.bodyList[7];
|
||||||
|
const senderName = message.bodyList[8];
|
||||||
|
|
||||||
return decodeProtocolMessage(message, {
|
return decodeProtocolMessage(message, {
|
||||||
roomSeq: message.bodyList[0],
|
roomSeq: message.bodyList[0],
|
||||||
|
@ -103,8 +105,8 @@ export const decodeSend: ProtocolDecoder<SendResponse> = (
|
||||||
message: sentMessage,
|
message: sentMessage,
|
||||||
receiverCount,
|
receiverCount,
|
||||||
pushStatus: message.bodyList[6] as PushStatus,
|
pushStatus: message.bodyList[6] as PushStatus,
|
||||||
ForcedExitType: message.bodyList[7],
|
forcedExitType,
|
||||||
senderName: message.bodyList[8],
|
senderName,
|
||||||
info: {
|
info: {
|
||||||
seq,
|
seq,
|
||||||
type: eventType,
|
type: eventType,
|
||||||
|
@ -112,7 +114,8 @@ export const decodeSend: ProtocolDecoder<SendResponse> = (
|
||||||
sendDate,
|
sendDate,
|
||||||
sentMessage,
|
sentMessage,
|
||||||
sentMessageJson: decodeEventJson(eventType, sentMessage),
|
sentMessageJson: decodeEventJson(eventType, sentMessage),
|
||||||
receiverCount
|
receiverCount,
|
||||||
|
exitForcingRequestUserName: senderName
|
||||||
}
|
}
|
||||||
} as SendResponse);
|
} as SendResponse);
|
||||||
};
|
};
|
||||||
|
@ -125,6 +128,8 @@ export const decodeSendNotification: ProtocolDecoder<SendNotification> = (
|
||||||
const sendDate = message.bodyList[3];
|
const sendDate = message.bodyList[3];
|
||||||
const sentMessage = message.bodyList[4];
|
const sentMessage = message.bodyList[4];
|
||||||
const receiverCount = message.bodyList[5] || 0;
|
const receiverCount = message.bodyList[5] || 0;
|
||||||
|
const forcedExitType = message.bodyList[7];
|
||||||
|
const senderName = message.bodyList[8];
|
||||||
|
|
||||||
return decodeProtocolMessage(message, {
|
return decodeProtocolMessage(message, {
|
||||||
roomSeq: message.bodyList[0],
|
roomSeq: message.bodyList[0],
|
||||||
|
@ -134,8 +139,8 @@ export const decodeSendNotification: ProtocolDecoder<SendNotification> = (
|
||||||
message: sentMessage,
|
message: sentMessage,
|
||||||
receiverCount,
|
receiverCount,
|
||||||
pushStatus: message.bodyList[6] as PushStatus,
|
pushStatus: message.bodyList[6] as PushStatus,
|
||||||
ForcedExitType: message.bodyList[7],
|
forcedExitType,
|
||||||
senderName: message.bodyList[8],
|
senderName,
|
||||||
id: message.bodyList[9],
|
id: message.bodyList[9],
|
||||||
companyCode: message.bodyList[10],
|
companyCode: message.bodyList[10],
|
||||||
info: {
|
info: {
|
||||||
|
@ -145,7 +150,8 @@ export const decodeSendNotification: ProtocolDecoder<SendNotification> = (
|
||||||
sendDate,
|
sendDate,
|
||||||
sentMessage,
|
sentMessage,
|
||||||
sentMessageJson: decodeEventJson(eventType, sentMessage),
|
sentMessageJson: decodeEventJson(eventType, sentMessage),
|
||||||
receiverCount
|
receiverCount,
|
||||||
|
exitForcingRequestUserName: senderName
|
||||||
}
|
}
|
||||||
} as SendNotification);
|
} as SendNotification);
|
||||||
};
|
};
|
||||||
|
|
|
@ -115,7 +115,7 @@ export const decodeUserShortData: ProtocolDecoder<UserShortData> = (
|
||||||
seq: Number(info[0]),
|
seq: Number(info[0]),
|
||||||
name: info[1],
|
name: info[1],
|
||||||
profileImageFile: info[2],
|
profileImageFile: info[2],
|
||||||
isJoinRoom: info[3],
|
isJoinRoom: info[3] === 'Y' ? true : false,
|
||||||
lastReadEventSeq: Number(info[4]),
|
lastReadEventSeq: Number(info[4]),
|
||||||
madn: info[5],
|
madn: info[5],
|
||||||
hardSadn: info[6],
|
hardSadn: info[6],
|
||||||
|
@ -192,17 +192,17 @@ export interface UserStatusOfflineResponse extends ProtocolResponse {
|
||||||
// 사용자SEQ(n)...
|
// 사용자SEQ(n)...
|
||||||
userSeqs: number[];
|
userSeqs: number[];
|
||||||
}
|
}
|
||||||
export const encodeUserStatusOffline: ProtocolEncoder<
|
export const encodeUserStatusOffline: ProtocolEncoder<UserStatusOfflineRequest> = (
|
||||||
UserStatusOfflineRequest
|
req: UserStatusOfflineRequest
|
||||||
> = (req: UserStatusOfflineRequest) => {
|
) => {
|
||||||
const bodyList: PacketBody[] = [];
|
const bodyList: PacketBody[] = [];
|
||||||
|
|
||||||
bodyList.push({ type: PacketBodyValue.String, value: req.roomSeq });
|
bodyList.push({ type: PacketBodyValue.String, value: req.roomSeq });
|
||||||
return bodyList;
|
return bodyList;
|
||||||
};
|
};
|
||||||
export const decodeUserStatusOffline: ProtocolDecoder<
|
export const decodeUserStatusOffline: ProtocolDecoder<UserStatusOfflineResponse> = (
|
||||||
UserStatusOfflineResponse
|
message: ProtocolMessage
|
||||||
> = (message: ProtocolMessage) => {
|
) => {
|
||||||
let userSeqs: number[] = [];
|
let userSeqs: number[] = [];
|
||||||
if (message.bodyList.length > 1) {
|
if (message.bodyList.length > 1) {
|
||||||
userSeqs = message.bodyList.slice(1);
|
userSeqs = message.bodyList.slice(1);
|
||||||
|
|
|
@ -27,7 +27,10 @@ import {
|
||||||
SSVC_TYPE_ROOM_EXIT_NOTI,
|
SSVC_TYPE_ROOM_EXIT_NOTI,
|
||||||
SSVC_TYPE_ROOM_EXIT_FORCING_NOTI,
|
SSVC_TYPE_ROOM_EXIT_FORCING_NOTI,
|
||||||
SSVC_TYPE_ROOM_FONT_UPD_NOTI,
|
SSVC_TYPE_ROOM_FONT_UPD_NOTI,
|
||||||
SSVC_TYPE_ROOM_UPD_RES
|
SSVC_TYPE_ROOM_UPD_RES,
|
||||||
|
SSVC_TYPE_ROOM_EXIT_FORCING_RES,
|
||||||
|
SSVC_TYPE_ROOM_EXIT_RES,
|
||||||
|
SSVC_TYPE_ROOM_INVITE_RES
|
||||||
} from '../types/service';
|
} from '../types/service';
|
||||||
import {
|
import {
|
||||||
OpenRequest,
|
OpenRequest,
|
||||||
|
@ -131,6 +134,13 @@ export class RoomProtocolService {
|
||||||
filter(message => message.serviceType === SVC_TYPE_ROOM),
|
filter(message => message.serviceType === SVC_TYPE_ROOM),
|
||||||
tap(message => {
|
tap(message => {
|
||||||
switch (message.subServiceType) {
|
switch (message.subServiceType) {
|
||||||
|
case SSVC_TYPE_ROOM_INVITE_RES:
|
||||||
|
{
|
||||||
|
this.notificationSubject.next(
|
||||||
|
decodeInviteNotification(message)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case SSVC_TYPE_ROOM_UPD_RES:
|
case SSVC_TYPE_ROOM_UPD_RES:
|
||||||
{
|
{
|
||||||
this.notificationSubject.next(
|
this.notificationSubject.next(
|
||||||
|
@ -151,6 +161,13 @@ export class RoomProtocolService {
|
||||||
this.notificationSubject.next(decodeExitNotification(message));
|
this.notificationSubject.next(decodeExitNotification(message));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case SSVC_TYPE_ROOM_EXIT_FORCING_RES:
|
||||||
|
{
|
||||||
|
this.notificationSubject.next(
|
||||||
|
decodeExitForcingNotification(message)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case SSVC_TYPE_ROOM_EXIT_FORCING_NOTI:
|
case SSVC_TYPE_ROOM_EXIT_FORCING_NOTI:
|
||||||
{
|
{
|
||||||
this.notificationSubject.next(
|
this.notificationSubject.next(
|
||||||
|
|
|
@ -109,7 +109,7 @@ export const decodeRoomUserData: ProtocolDecoder<RoomUserData> = (
|
||||||
seq: Number(info[0]),
|
seq: Number(info[0]),
|
||||||
name: info[1],
|
name: info[1],
|
||||||
profileImageFile: info[2],
|
profileImageFile: info[2],
|
||||||
isJoinRoom: info[3],
|
isJoinRoom: info[3] === 'Y' ? true : false,
|
||||||
lastReadEventSeq: Number(info[4]),
|
lastReadEventSeq: Number(info[4]),
|
||||||
madn: info[5],
|
madn: info[5],
|
||||||
hardSadn: info[6],
|
hardSadn: info[6],
|
||||||
|
|
|
@ -47,6 +47,12 @@ export class InformationComponent implements OnInit {
|
||||||
this.contents = `${m.sentMessage}님이 퇴장하셨습니다.`;
|
this.contents = `${m.sentMessage}님이 퇴장하셨습니다.`;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case EventType.ForcedExit:
|
||||||
|
{
|
||||||
|
const m = this.message as Info<JoinEventJson>;
|
||||||
|
this.contents = `${m.exitForcingRequestUserName} 님이 ${m.sentMessage} 님을 퇴장 시키셨습니다.`;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case EventType.RenameRoom:
|
case EventType.RenameRoom:
|
||||||
{
|
{
|
||||||
const m = this.message as Info<RenameRoomEventJson>;
|
const m = this.message as Info<RenameRoomEventJson>;
|
||||||
|
|
|
@ -40,6 +40,12 @@
|
||||||
class="information-msg"
|
class="information-msg"
|
||||||
>
|
>
|
||||||
</ucap-chat-message-box-information>
|
</ucap-chat-message-box-information>
|
||||||
|
<ucap-chat-message-box-information
|
||||||
|
*ngSwitchCase="EventType.ForcedExit"
|
||||||
|
[message]="message"
|
||||||
|
class="information-msg"
|
||||||
|
>
|
||||||
|
</ucap-chat-message-box-information>
|
||||||
<ucap-chat-message-box-information
|
<ucap-chat-message-box-information
|
||||||
*ngSwitchCase="EventType.RenameRoom"
|
*ngSwitchCase="EventType.RenameRoom"
|
||||||
[message]="message"
|
[message]="message"
|
||||||
|
|
|
@ -135,6 +135,7 @@ export class MessagesComponent implements OnInit {
|
||||||
if (
|
if (
|
||||||
info.type === EventType.Join ||
|
info.type === EventType.Join ||
|
||||||
info.type === EventType.Exit ||
|
info.type === EventType.Exit ||
|
||||||
|
info.type === EventType.ForcedExit ||
|
||||||
info.type === EventType.RenameRoom ||
|
info.type === EventType.RenameRoom ||
|
||||||
info.type === EventType.NotificationForTimerRoom ||
|
info.type === EventType.NotificationForTimerRoom ||
|
||||||
info.type === EventType.GuideForRoomTimerChanged
|
info.type === EventType.GuideForRoomTimerChanged
|
||||||
|
|
|
@ -97,7 +97,10 @@ export class ListItemComponent implements OnInit {
|
||||||
let roomName = '';
|
let roomName = '';
|
||||||
this.roomUserInfo.forEach(
|
this.roomUserInfo.forEach(
|
||||||
(roomUserInfo: RoomUserInfo | UserInfoShort, index: number) => {
|
(roomUserInfo: RoomUserInfo | UserInfoShort, index: number) => {
|
||||||
if (this.loginRes.userSeq === roomUserInfo.seq) {
|
if (
|
||||||
|
this.loginRes.userSeq === roomUserInfo.seq ||
|
||||||
|
!roomUserInfo.isJoinRoom
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ('' === roomName.trim()) {
|
if ('' === roomName.trim()) {
|
||||||
|
|
|
@ -2,7 +2,7 @@ import {
|
||||||
EventType,
|
EventType,
|
||||||
EventJson,
|
EventJson,
|
||||||
FileEventJson,
|
FileEventJson,
|
||||||
MassTextEventJson,
|
MassTextEventJson
|
||||||
} from '@ucap-webmessenger/protocol-event';
|
} from '@ucap-webmessenger/protocol-event';
|
||||||
import { FileType } from '@ucap-webmessenger/protocol-file';
|
import { FileType } from '@ucap-webmessenger/protocol-file';
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ export class StringUtil {
|
||||||
'수요일',
|
'수요일',
|
||||||
'목요일',
|
'목요일',
|
||||||
'금요일',
|
'금요일',
|
||||||
'토요일',
|
'토요일'
|
||||||
];
|
];
|
||||||
|
|
||||||
const weekKorShortName = ['일', '월', '화', '수', '목', '금', '토'];
|
const weekKorShortName = ['일', '월', '화', '수', '목', '금', '토'];
|
||||||
|
@ -91,7 +91,7 @@ export class StringUtil {
|
||||||
'Wednesday',
|
'Wednesday',
|
||||||
'Thursday',
|
'Thursday',
|
||||||
'Friday',
|
'Friday',
|
||||||
'Saturday',
|
'Saturday'
|
||||||
];
|
];
|
||||||
|
|
||||||
const weekEngShortName = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
const weekEngShortName = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
||||||
|
@ -158,6 +158,7 @@ export class StringUtil {
|
||||||
switch (eventType) {
|
switch (eventType) {
|
||||||
case EventType.Join:
|
case EventType.Join:
|
||||||
case EventType.Exit:
|
case EventType.Exit:
|
||||||
|
case EventType.ForcedExit:
|
||||||
case EventType.RenameRoom:
|
case EventType.RenameRoom:
|
||||||
case EventType.NotificationForTimerRoom:
|
case EventType.NotificationForTimerRoom:
|
||||||
case EventType.GuideForRoomTimerChanged:
|
case EventType.GuideForRoomTimerChanged:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user