diff --git a/projects/ucap-webmessenger-protocol-info/src/lib/models/status.ts b/projects/ucap-webmessenger-protocol-info/src/lib/models/status.ts index f3b8cb53..ab3c5364 100644 --- a/projects/ucap-webmessenger-protocol-info/src/lib/models/status.ts +++ b/projects/ucap-webmessenger-protocol-info/src/lib/models/status.ts @@ -42,7 +42,7 @@ export const decodeStatus: ProtocolDecoder = ( const info = statusInfo.split(BodyStringDivider); let idx = 0; statusInfos.push({ - userSeq: info[idx], + userSeq: Number(info[idx]), pcStatus: info[idx++] as StatusCode, phoneStatus: info[idx++] as StatusCode, mobileStatus: info[idx++] as StatusCode, diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/data-user.ts b/projects/ucap-webmessenger-protocol-query/src/lib/models/data-user.ts index 0851acc7..87216ce4 100644 --- a/projects/ucap-webmessenger-protocol-query/src/lib/models/data-user.ts +++ b/projects/ucap-webmessenger-protocol-query/src/lib/models/data-user.ts @@ -52,7 +52,7 @@ export const decodeDataUser: ProtocolDecoder = ( const info = message.bodyList[1].split(BodyStringDivider); let i = 0; userInfo = { - seq: info[i], + seq: Number(info[i]), name: info[i++], profileImageFile: info[i++], grade: info[i++], diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/dept-user.ts b/projects/ucap-webmessenger-protocol-query/src/lib/models/dept-user.ts index f76db055..bfa43384 100644 --- a/projects/ucap-webmessenger-protocol-query/src/lib/models/dept-user.ts +++ b/projects/ucap-webmessenger-protocol-query/src/lib/models/dept-user.ts @@ -144,7 +144,7 @@ export const decodeDeptUserData: ProtocolDecoder = ( const info = userInfo.split(BodyStringDivider); let i = 0; userInfos.push({ - seq: info[i], + seq: Number(info[i]), name: info[i++], profileImageFile: info[i++], grade: info[i++], diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/dept.ts b/projects/ucap-webmessenger-protocol-query/src/lib/models/dept.ts index 1e5b56ac..faa0bbfc 100644 --- a/projects/ucap-webmessenger-protocol-query/src/lib/models/dept.ts +++ b/projects/ucap-webmessenger-protocol-query/src/lib/models/dept.ts @@ -69,14 +69,14 @@ export const decodeDeptData: ProtocolDecoder = ( const info = deptInfo.split(BodyStringDivider); let i = 0; departmentInfos.push({ - seq: info[i], + seq: Number(info[i]), name: info[i++], companyCode: info[i++], type: info[i++] as DeptType, - rootSeq: info[i++], - parentSeq: info[i++], + rootSeq: Number(info[i++]), + parentSeq: Number(info[i++]), order: info[i++], - depth: info[i++], + depth: Number(info[i++]), isActive: info[i++] === 'Y' ? true : false, nameEn: info[i++], nameCn: info[i++] diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/user-dn.ts b/projects/ucap-webmessenger-protocol-query/src/lib/models/user-dn.ts index bd5d7246..0ba021a5 100644 --- a/projects/ucap-webmessenger-protocol-query/src/lib/models/user-dn.ts +++ b/projects/ucap-webmessenger-protocol-query/src/lib/models/user-dn.ts @@ -135,7 +135,7 @@ export const decodeUserDnData: ProtocolDecoder = ( const info = userDnInfo.split(BodyStringDivider); let i = 0; userDnInfos.push({ - seq: info[i], + seq: Number(info[i]), name: info[i++], profileImageFile: info[i++], grade: info[i++], diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/user-id.ts b/projects/ucap-webmessenger-protocol-query/src/lib/models/user-id.ts index fee5df6e..5dc94f41 100644 --- a/projects/ucap-webmessenger-protocol-query/src/lib/models/user-id.ts +++ b/projects/ucap-webmessenger-protocol-query/src/lib/models/user-id.ts @@ -65,7 +65,7 @@ export const decodeUserIdData: ProtocolDecoder = ( const info = userInfo.split(BodyStringDivider); userSeqInfos.push({ id: info[0], - seq: info[1], + seq: Number(info[1]), isMobile: info[2] === 'Y' ? true : false, companyCode: info[3] }); diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/user-seq.ts b/projects/ucap-webmessenger-protocol-query/src/lib/models/user-seq.ts index cb4d8220..0f416fd4 100644 --- a/projects/ucap-webmessenger-protocol-query/src/lib/models/user-seq.ts +++ b/projects/ucap-webmessenger-protocol-query/src/lib/models/user-seq.ts @@ -124,7 +124,7 @@ export const decodeUserSeqData: ProtocolDecoder = ( const info = userInfo.split(BodyStringDivider); let i = 0; userInfos.push({ - seq: info[i], + seq: Number(info[i]), name: info[i++], profileImageFile: info[i++], grade: info[i++], @@ -169,7 +169,7 @@ export const decodeUserSeqData2: ProtocolDecoder = ( const info = userInfo.split(BodyStringDivider); let i = 0; userInfos.push({ - seq: info[i], + seq: Number(info[i]), name: info[i++], profileImageFile: info[i++], grade: info[i++], diff --git a/projects/ucap-webmessenger-protocol-room/src/lib/models/info.ts b/projects/ucap-webmessenger-protocol-room/src/lib/models/info.ts index 87fbab49..53b9b9c4 100644 --- a/projects/ucap-webmessenger-protocol-room/src/lib/models/info.ts +++ b/projects/ucap-webmessenger-protocol-room/src/lib/models/info.ts @@ -207,13 +207,13 @@ export const decodeInfoData: ProtocolDecoder = ( finalEventType: info[3] as EventType, finalEventMessage: info[4], finalEventDate: info[5], - joinUserCount: info[6], - noReadCnt: info[7], + joinUserCount: Number(info[6]), + noReadCnt: Number(info[7]), isAlarm: info[8] !== 'N' ? true : false, isJoinRoom: info[9] === 'Y' ? true : false, - expiredFileStdSeq: info[10], + expiredFileStdSeq: Number(info[10]), isTimeRoom: info[11] === 'Y' ? true : false, - timeRoomInterval: info[11] !== 'Y' ? 0 : info[12] || 0 + timeRoomInterval: info[11] !== 'Y' ? 0 : Number(info[12]) || 0 }; } } @@ -231,11 +231,11 @@ export const decodeUserShortData: ProtocolDecoder = ( message.bodyList.slice(1).forEach(userInfo => { const info = userInfo.split(BodyStringDivider); userInfos.push({ - seq: info[0], + seq: Number(info[0]), name: info[1], profileImageFile: info[2], isJoinRoom: info[3], - lastReadEventSeq: info[4], + lastReadEventSeq: Number(info[4]), madn: info[5], hardSadn: info[6], fmcSadn: info[7], @@ -261,7 +261,7 @@ export const decodeUserData: ProtocolDecoder = ( message.bodyList.slice(1).forEach(userInfo => { const info = userInfo.split(BodyStringDivider); userInfos.push({ - seq: info[0], + seq: Number(info[0]), name: info[1], profileImageFile: info[2], grade: info[3], diff --git a/projects/ucap-webmessenger-protocol-status/src/lib/models/buddy.ts b/projects/ucap-webmessenger-protocol-status/src/lib/models/buddy.ts index 2c78e214..1a6bb3eb 100644 --- a/projects/ucap-webmessenger-protocol-status/src/lib/models/buddy.ts +++ b/projects/ucap-webmessenger-protocol-status/src/lib/models/buddy.ts @@ -20,7 +20,7 @@ export const decodeBuddy: ProtocolDecoder = ( const info = statusInfo.split(BodyStringDivider); let idx = 0; statusInfos.push({ - userSeq: info[idx], + userSeq: Number(info[idx]), pcStatus: info[idx++] as StatusCode, phoneStatus: info[idx++] as StatusCode, mobileStatus: info[idx++] as StatusCode, diff --git a/projects/ucap-webmessenger-protocol-status/src/lib/models/bulk.ts b/projects/ucap-webmessenger-protocol-status/src/lib/models/bulk.ts index f82dc65a..4166e4dd 100644 --- a/projects/ucap-webmessenger-protocol-status/src/lib/models/bulk.ts +++ b/projects/ucap-webmessenger-protocol-status/src/lib/models/bulk.ts @@ -76,7 +76,7 @@ export const decodeBulkInfoData: ProtocolDecoder = ( const info = statusBulkInfo.split(BodyStringDivider); let idx = 0; statusBulkInfos.push({ - userSeq: info[idx], + userSeq: Number(info[idx]), pcStatus: info[idx++] as StatusCode, phoneStatus: info[idx++] as StatusCode, mobileStatus: info[idx++] as StatusCode, @@ -85,7 +85,7 @@ export const decodeBulkInfoData: ProtocolDecoder = ( mobileConferenceStatus: info[idx++] as StatusCode, imessengerStatus: info[idx++] as StatusCode, terminalStatus: info[idx++] as TerminalStatusInfo, - terminalStatusNumber: info[idx++] as TerminalStatusNumber + terminalStatusNumber: Number(info[idx++]) as TerminalStatusNumber }); }); return { @@ -93,20 +93,3 @@ export const decodeBulkInfoData: ProtocolDecoder = ( statusBulkInfos } as BulkInfoData; }; - -// export const decodeStatusNotification: ProtocolDecoder = ( -// message: ProtocolMessage -// ) => { -// const info = message.bodyList[0].split(BodyStringDivider); -// let idx = 0; -// return { -// userSeq: info[idx], -// pcStatus: info[idx++] as StatusCode, -// phoneStatus: info[idx++] as StatusCode, -// mobileStatus: info[idx++] as StatusCode, -// conferenceStatus: info[idx++] as StatusCode, -// statusMessage: info[idx++], -// mobileConferenceStatus: info[idx++] as StatusCode, -// imessengerStatus: info[idx++] as StatusCode -// } as StatusNotification; -// }; diff --git a/projects/ucap-webmessenger-protocol-status/src/lib/models/status.ts b/projects/ucap-webmessenger-protocol-status/src/lib/models/status.ts index 9cad9e0b..675aa20e 100644 --- a/projects/ucap-webmessenger-protocol-status/src/lib/models/status.ts +++ b/projects/ucap-webmessenger-protocol-status/src/lib/models/status.ts @@ -84,7 +84,7 @@ export const decodeStatusNotification: ProtocolDecoder = ( const info = message.bodyList[0].split(BodyStringDivider); let idx = 0; return { - userSeq: info[idx], + userSeq: Number(info[idx]), pcStatus: info[idx++] as StatusCode, phoneStatus: info[idx++] as StatusCode, mobileStatus: info[idx++] as StatusCode, diff --git a/projects/ucap-webmessenger-protocol-status/src/lib/models/subscribe.ts b/projects/ucap-webmessenger-protocol-status/src/lib/models/subscribe.ts index b879fd2a..f96a47ff 100644 --- a/projects/ucap-webmessenger-protocol-status/src/lib/models/subscribe.ts +++ b/projects/ucap-webmessenger-protocol-status/src/lib/models/subscribe.ts @@ -49,7 +49,7 @@ export const decodeSubscribe: ProtocolDecoder = ( const info = statusInfo.split(BodyStringDivider); let idx = 0; statusInfos.push({ - userSeq: info[idx], + userSeq: Number(info[idx]), pcStatus: info[idx++] as StatusCode, phoneStatus: info[idx++] as StatusCode, mobileStatus: info[idx++] as StatusCode, @@ -76,7 +76,7 @@ export const decodeSubscribeData: ProtocolDecoder = ( const info = statusInfo.split(BodyStringDivider); let idx = 0; statusInfos.push({ - userSeq: info[idx], + userSeq: Number(info[idx]), pcStatus: info[idx++] as StatusCode, phoneStatus: info[idx++] as StatusCode, mobileStatus: info[idx++] as StatusCode, diff --git a/projects/ucap-webmessenger-protocol-sync/src/lib/models/group.ts b/projects/ucap-webmessenger-protocol-sync/src/lib/models/group.ts index 62d0dd11..95e9b49f 100644 --- a/projects/ucap-webmessenger-protocol-sync/src/lib/models/group.ts +++ b/projects/ucap-webmessenger-protocol-sync/src/lib/models/group.ts @@ -70,7 +70,7 @@ export const decodeGroupData: ProtocolDecoder = ( message.bodyList.forEach(buddyinfo => { const info = buddyinfo.split(BodyStringDivider); groupInfos.push({ - seq: info[0], + seq: Number(info[0]), name: info[1], isActive: info[2] === 'Y' ? true : false, userSeqStr: info[3] diff --git a/projects/ucap-webmessenger-protocol-sync/src/lib/models/room.ts b/projects/ucap-webmessenger-protocol-sync/src/lib/models/room.ts index 612dd4b9..4410721d 100644 --- a/projects/ucap-webmessenger-protocol-sync/src/lib/models/room.ts +++ b/projects/ucap-webmessenger-protocol-sync/src/lib/models/room.ts @@ -80,11 +80,11 @@ export const decodeRoomData: ProtocolDecoder = ( finalEventType: info[3] as EventType, finalEventMessage: info[4], finalEventDate: info[5], - joinUserCount: info[6], - noReadCnt: info[7], + joinUserCount: Number(info[6]), + noReadCnt: Number(info[7]), isAlarm: info[8] !== 'N' ? true : false, isJoinRoom: info[9] === 'Y' ? true : false, - expiredFileStdSeq: info[10], + expiredFileStdSeq: Number(info[10]), isTimeRoom: info[11] === 'Y' ? true : false, timeRoomInterval: info[11] !== 'Y' ? 0 : info[12] || 0 }); @@ -104,11 +104,11 @@ export const decodeRoomUserData: ProtocolDecoder = ( message.bodyList.slice(1).forEach(userInfo => { const info = userInfo.split(BodyStringDivider); userInfos.push({ - seq: info[0], + seq: Number(info[0]), name: info[1], profileImageFile: info[2], isJoinRoom: info[3], - lastReadEventSeq: info[4], + lastReadEventSeq: Number(info[4]), madn: info[5], hardSadn: info[6], fmcSadn: info[7], @@ -134,7 +134,7 @@ export const decodeRoomUserDataDetail: ProtocolDecoder = ( message.bodyList.slice(1).forEach(userInfo => { const info = userInfo.split(BodyStringDivider); userInfos.push({ - seq: info[0], + seq: Number(info[0]), name: info[1], profileImageFile: info[2], grade: info[3],