diff --git a/projects/ucap-webmessenger-protocol-group/src/lib/models/group-update.ts b/projects/ucap-webmessenger-protocol-group/src/lib/models/group-update.ts index ba28ad7e..996b5f5a 100644 --- a/projects/ucap-webmessenger-protocol-group/src/lib/models/group-update.ts +++ b/projects/ucap-webmessenger-protocol-group/src/lib/models/group-update.ts @@ -15,7 +15,7 @@ export interface GroupUpdateRequest extends ProtocolRequest { // 1: 동료그룹이름(s) groupName: string; // 2n: 사용자SEQ(n)... - userSeqs: []; + userSeqs: number[]; } export interface GroupUpdateResponse extends ProtocolResponse { @@ -24,7 +24,7 @@ export interface GroupUpdateResponse extends ProtocolResponse { // 1: 동료그룹이름(s) groupName: string; // 2n: 사용자SEQ(n)... - userSeqs: []; + userSeqs: number[]; } export const encodeGroupUpdate: ProtocolEncoder = ( @@ -35,7 +35,7 @@ export const encodeGroupUpdate: ProtocolEncoder = ( bodyList.push( { type: PacketBodyValue.Integer, value: req.groupSeq }, { type: PacketBodyValue.String, value: req.groupName }, - { type: PacketBodyValue.String, value: req.userSeqs.join() } + { type: PacketBodyValue.String, value: req.userSeqs.join(',') } ); return bodyList; @@ -44,9 +44,9 @@ export const encodeGroupUpdate: ProtocolEncoder = ( export const decodeGroupUpdate: ProtocolDecoder = ( message: ProtocolMessage ) => { - let userSeqArray: Array = []; + let userSeqArray: number[] = []; if (message.bodyList.length > 2 && !message.bodyList[2].empty()) { - userSeqArray = message.bodyList[2].split(',').map(v => Number(v)); + userSeqArray = message.bodyList[2].split(',').map((v: any) => Number(v)); } return { @@ -78,7 +78,7 @@ export const encodeGroupUpdate2: ProtocolEncoder = ( export const decodeGroupUpdate2: ProtocolDecoder = ( message: ProtocolMessage ) => { - let userSeqArray: Array = []; + let userSeqArray: number[] = []; if (message.bodyList.length > 2) { userSeqArray = message.bodyList.slice(2); }