bug fix :: 기존방에 새 EVENT_SEND_NOTI 가 발생시 방리스트 정보에 finalEventMessage 를 갱신해 주는데 json 형식의 데이터 노출되는 문제 수정.
/// 입장 , 퇴장 정보에 대한 처리가 필요할 수도 있다.
This commit is contained in:
parent
bb527dcb65
commit
e7bbdeb105
|
@ -28,6 +28,8 @@ import {
|
||||||
|
|
||||||
import * as RoomStore from '@app/store/messenger/room';
|
import * as RoomStore from '@app/store/messenger/room';
|
||||||
import { RoomInfo } from '@ucap-webmessenger/protocol-room';
|
import { RoomInfo } from '@ucap-webmessenger/protocol-room';
|
||||||
|
import { EventType } from '@ucap-webmessenger/protocol-event';
|
||||||
|
import { FileType } from '@ucap-webmessenger/protocol-file';
|
||||||
|
|
||||||
export const reducer = createReducer(
|
export const reducer = createReducer(
|
||||||
initialState,
|
initialState,
|
||||||
|
@ -99,10 +101,29 @@ export const reducer = createReducer(
|
||||||
}),
|
}),
|
||||||
|
|
||||||
on(updateRoomForNewEventMessage, (state, action) => {
|
on(updateRoomForNewEventMessage, (state, action) => {
|
||||||
|
let finalEventMessage: string = action.info.sentMessage;
|
||||||
|
switch (action.info.type) {
|
||||||
|
case EventType.Sticker:
|
||||||
|
finalEventMessage = '스티커';
|
||||||
|
break;
|
||||||
|
case EventType.File:
|
||||||
|
{
|
||||||
|
const contentJson = JSON.parse(finalEventMessage);
|
||||||
|
if (contentJson.FileType === FileType.Image) {
|
||||||
|
finalEventMessage = '이미지';
|
||||||
|
} else {
|
||||||
|
finalEventMessage = '첨부파일';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case EventType.VideoConference:
|
||||||
|
finalEventMessage = '화상회의';
|
||||||
|
break;
|
||||||
|
}
|
||||||
const roomInfo = {
|
const roomInfo = {
|
||||||
...state.room.entities[action.roomSeq],
|
...state.room.entities[action.roomSeq],
|
||||||
finalEventDate: action.info.sendDate,
|
finalEventDate: action.info.sendDate,
|
||||||
finalEventMessage: action.info.sentMessage
|
finalEventMessage
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user