fixed number type
This commit is contained in:
parent
d26b4a694b
commit
ed8d623da8
|
@ -42,7 +42,7 @@ export const decodeStatus: ProtocolDecoder<StatusResponse> = (
|
|||
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,
|
||||
|
|
|
@ -52,7 +52,7 @@ export const decodeDataUser: ProtocolDecoder<DataUserResponse> = (
|
|||
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++],
|
||||
|
|
|
@ -144,7 +144,7 @@ export const decodeDeptUserData: ProtocolDecoder<DeptUserData> = (
|
|||
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++],
|
||||
|
|
|
@ -69,14 +69,14 @@ export const decodeDeptData: ProtocolDecoder<DeptData> = (
|
|||
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++]
|
||||
|
|
|
@ -135,7 +135,7 @@ export const decodeUserDnData: ProtocolDecoder<UserDnData> = (
|
|||
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++],
|
||||
|
|
|
@ -65,7 +65,7 @@ export const decodeUserIdData: ProtocolDecoder<UserIdData> = (
|
|||
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]
|
||||
});
|
||||
|
|
|
@ -124,7 +124,7 @@ export const decodeUserSeqData: ProtocolDecoder<UserSeqData> = (
|
|||
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<UserSeqData2> = (
|
|||
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++],
|
||||
|
|
|
@ -207,13 +207,13 @@ export const decodeInfoData: ProtocolDecoder<InfoData> = (
|
|||
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<UserShortData> = (
|
|||
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<UserData> = (
|
|||
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],
|
||||
|
|
|
@ -20,7 +20,7 @@ export const decodeBuddy: ProtocolDecoder<BuddyResponse> = (
|
|||
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 decodeBulkInfoData: ProtocolDecoder<BulkInfoData> = (
|
|||
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<BulkInfoData> = (
|
|||
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<BulkInfoData> = (
|
|||
statusBulkInfos
|
||||
} as BulkInfoData;
|
||||
};
|
||||
|
||||
// export const decodeStatusNotification: ProtocolDecoder<StatusNotification> = (
|
||||
// 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;
|
||||
// };
|
||||
|
|
|
@ -84,7 +84,7 @@ export const decodeStatusNotification: ProtocolDecoder<StatusNotification> = (
|
|||
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,
|
||||
|
|
|
@ -49,7 +49,7 @@ export const decodeSubscribe: ProtocolDecoder<SubscribeResponse> = (
|
|||
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<SubscribeData> = (
|
|||
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,
|
||||
|
|
|
@ -70,7 +70,7 @@ export const decodeGroupData: ProtocolDecoder<GroupData> = (
|
|||
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]
|
||||
|
|
|
@ -80,11 +80,11 @@ export const decodeRoomData: ProtocolDecoder<RoomData> = (
|
|||
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<RoomUserData> = (
|
|||
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<RoomUserDetailData> = (
|
|||
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],
|
||||
|
|
Loading…
Reference in New Issue
Block a user