bug fixed
This commit is contained in:
parent
26295889d7
commit
8b0fa27920
|
@ -69,12 +69,12 @@ export const decodeInfoData: ProtocolDecoder<InfoData> = (
|
||||||
const infoList: Info[] = [];
|
const infoList: Info[] = [];
|
||||||
for (let i = 1; i < message.bodyList.length; ) {
|
for (let i = 1; i < message.bodyList.length; ) {
|
||||||
infoList.push({
|
infoList.push({
|
||||||
seq: message.bodyList[i++],
|
seq: message.bodyList[0],
|
||||||
type: message.bodyList[i++],
|
type: message.bodyList[1],
|
||||||
senderSeq: message.bodyList[i++],
|
senderSeq: message.bodyList[2],
|
||||||
sendDate: message.bodyList[i++],
|
sendDate: message.bodyList[3],
|
||||||
sentMessage: message.bodyList[i++],
|
sentMessage: message.bodyList[4],
|
||||||
receiverCount: message.bodyList[i++]
|
receiverCount: message.bodyList[5]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,19 +91,18 @@ export const decodeInfoData: ProtocolDecoder<InfoData> = (
|
||||||
const fileInfos: FileInfo[] = [];
|
const fileInfos: FileInfo[] = [];
|
||||||
message.bodyList.forEach(fileInfo => {
|
message.bodyList.forEach(fileInfo => {
|
||||||
const info = fileInfo.split(BodyStringDivider);
|
const info = fileInfo.split(BodyStringDivider);
|
||||||
let i = 0;
|
|
||||||
fileInfos.push({
|
fileInfos.push({
|
||||||
roomSeq: info[i],
|
roomSeq: info[0],
|
||||||
eventSeq: Number(info[i++]),
|
eventSeq: Number(info[1]),
|
||||||
seq: Number(info[i++]),
|
seq: Number(info[2]),
|
||||||
senderSeq: Number(info[i++]),
|
senderSeq: Number(info[3]),
|
||||||
type: info[i++] as FileType,
|
type: info[4] as FileType,
|
||||||
name: info[i++],
|
name: info[5],
|
||||||
url: info[i++],
|
url: info[6],
|
||||||
size: info[i++],
|
size: info[7],
|
||||||
sendDate: info[i++],
|
sendDate: info[8],
|
||||||
receivedUserCount: Number(info[i++]),
|
receivedUserCount: Number(info[9]),
|
||||||
receiverCount: Number(info[i++])
|
receiverCount: Number(info[10])
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -118,14 +117,13 @@ export const decodeInfoCheckData: ProtocolDecoder<InfoCheckData> = (
|
||||||
const fileDownloadInfos: FileDownloadInfo[] = [];
|
const fileDownloadInfos: FileDownloadInfo[] = [];
|
||||||
message.bodyList.forEach(fileInfo => {
|
message.bodyList.forEach(fileInfo => {
|
||||||
const info = fileInfo.split(BodyStringDivider);
|
const info = fileInfo.split(BodyStringDivider);
|
||||||
let i = 0;
|
|
||||||
fileDownloadInfos.push({
|
fileDownloadInfos.push({
|
||||||
roomSeq: info[i],
|
roomSeq: info[0],
|
||||||
seq: Number(info[i++]),
|
seq: Number(info[1]),
|
||||||
userSeq: Number(info[i++]),
|
userSeq: Number(info[2]),
|
||||||
userName: info[i++],
|
userName: info[3],
|
||||||
downloadDate: info[i++],
|
downloadDate: info[4],
|
||||||
isDownload: info[i++] === 'Y' ? true : false
|
isDownload: info[5] === 'Y' ? true : false
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -40,16 +40,15 @@ export const decodeStatus: ProtocolDecoder<StatusResponse> = (
|
||||||
const statusInfos: StatusInfo[] = [];
|
const statusInfos: StatusInfo[] = [];
|
||||||
message.bodyList.forEach(statusInfo => {
|
message.bodyList.forEach(statusInfo => {
|
||||||
const info = statusInfo.split(BodyStringDivider);
|
const info = statusInfo.split(BodyStringDivider);
|
||||||
let idx = 0;
|
|
||||||
statusInfos.push({
|
statusInfos.push({
|
||||||
userSeq: Number(info[idx]),
|
userSeq: Number(info[0]),
|
||||||
pcStatus: info[idx++] as StatusCode,
|
pcStatus: info[1] as StatusCode,
|
||||||
phoneStatus: info[idx++] as StatusCode,
|
phoneStatus: info[2] as StatusCode,
|
||||||
mobileStatus: info[idx++] as StatusCode,
|
mobileStatus: info[3] as StatusCode,
|
||||||
conferenceStatus: info[idx++] as StatusCode,
|
conferenceStatus: info[4] as StatusCode,
|
||||||
statusMessage: info[idx++],
|
statusMessage: info[5],
|
||||||
mobileConferenceStatus: info[idx++] as StatusCode,
|
mobileConferenceStatus: info[6] as StatusCode,
|
||||||
imessengerStatus: info[idx++] as StatusCode
|
imessengerStatus: info[7] as StatusCode
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -50,37 +50,36 @@ export const decodeDataUser: ProtocolDecoder<DataUserResponse> = (
|
||||||
let userInfo: UserInfoSS;
|
let userInfo: UserInfoSS;
|
||||||
if (message.bodyList.length > 1) {
|
if (message.bodyList.length > 1) {
|
||||||
const info = message.bodyList[1].split(BodyStringDivider);
|
const info = message.bodyList[1].split(BodyStringDivider);
|
||||||
let i = 0;
|
|
||||||
userInfo = {
|
userInfo = {
|
||||||
seq: Number(info[i]),
|
seq: Number(info[0]),
|
||||||
name: info[i++],
|
name: info[1],
|
||||||
profileImageFile: info[i++],
|
profileImageFile: info[2],
|
||||||
grade: info[i++],
|
grade: info[3],
|
||||||
intro: info[i++],
|
intro: info[4],
|
||||||
companyCode: info[i++],
|
companyCode: info[5],
|
||||||
hpNumber: info[i++],
|
hpNumber: info[6],
|
||||||
lineNumber: info[i++],
|
lineNumber: info[7],
|
||||||
email: info[i++],
|
email: info[8],
|
||||||
isMobile: info[i++] === 'Y' ? true : false,
|
isMobile: info[9] === 'Y' ? true : false,
|
||||||
deptName: info[i++],
|
deptName: info[10],
|
||||||
order: info[i++],
|
order: info[11],
|
||||||
isActive: info[i++] === 'Y' ? true : false,
|
isActive: info[12] === 'Y' ? true : false,
|
||||||
roleCd: info[i++] as RoleCode,
|
roleCd: info[13] as RoleCode,
|
||||||
employeeNum: info[i++],
|
employeeNum: info[14],
|
||||||
madn: info[i++],
|
madn: info[15],
|
||||||
hardSadn: info[i++],
|
hardSadn: info[16],
|
||||||
fmcSadn: info[i++],
|
fmcSadn: info[17],
|
||||||
callMode: info[i++],
|
callMode: info[18],
|
||||||
nameEn: info[i++],
|
nameEn: info[19],
|
||||||
nameCn: info[i++],
|
nameCn: info[20],
|
||||||
gradeEn: info[i++],
|
gradeEn: info[21],
|
||||||
gradeCn: info[i++],
|
gradeCn: info[22],
|
||||||
deptNameEn: info[i++],
|
deptNameEn: info[23],
|
||||||
deptNameCn: info[i++],
|
deptNameCn: info[24],
|
||||||
deptSeq: info[i++],
|
deptSeq: info[25],
|
||||||
isPrivacyAgree: info[i++] === 'Y' ? true : false,
|
isPrivacyAgree: info[26] === 'Y' ? true : false,
|
||||||
isValidLogin: info[i++] === 'Y' ? true : false,
|
isValidLogin: info[27] === 'Y' ? true : false,
|
||||||
employeeType: info[i++] as EmployeeType
|
employeeType: info[28] as EmployeeType
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -142,37 +142,36 @@ export const decodeDeptUserData: ProtocolDecoder<DeptUserData> = (
|
||||||
const userInfos: UserInfoSS[] = [];
|
const userInfos: UserInfoSS[] = [];
|
||||||
message.bodyList.slice(1).forEach(userInfo => {
|
message.bodyList.slice(1).forEach(userInfo => {
|
||||||
const info = userInfo.split(BodyStringDivider);
|
const info = userInfo.split(BodyStringDivider);
|
||||||
let i = 0;
|
|
||||||
userInfos.push({
|
userInfos.push({
|
||||||
seq: Number(info[i]),
|
seq: Number(info[0]),
|
||||||
name: info[i++],
|
name: info[1],
|
||||||
profileImageFile: info[i++],
|
profileImageFile: info[2],
|
||||||
grade: info[i++],
|
grade: info[3],
|
||||||
intro: info[i++],
|
intro: info[4],
|
||||||
companyCode: info[i++],
|
companyCode: info[5],
|
||||||
hpNumber: info[i++],
|
hpNumber: info[6],
|
||||||
lineNumber: info[i++],
|
lineNumber: info[7],
|
||||||
email: info[i++],
|
email: info[8],
|
||||||
isMobile: info[i++] === 'Y' ? true : false,
|
isMobile: info[9] === 'Y' ? true : false,
|
||||||
deptName: info[i++],
|
deptName: info[10],
|
||||||
order: info[i++],
|
order: info[11],
|
||||||
isActive: info[i++] === 'Y' ? true : false,
|
isActive: info[12] === 'Y' ? true : false,
|
||||||
roleCd: info[i++] as RoleCode,
|
roleCd: info[13] as RoleCode,
|
||||||
employeeNum: info[i++],
|
employeeNum: info[14],
|
||||||
madn: info[i++],
|
madn: info[15],
|
||||||
hardSadn: info[i++],
|
hardSadn: info[16],
|
||||||
fmcSadn: info[i++],
|
fmcSadn: info[17],
|
||||||
callMode: info[i++] as CallMode,
|
callMode: info[18] as CallMode,
|
||||||
nameEn: info[i++],
|
nameEn: info[19],
|
||||||
nameCn: info[i++],
|
nameCn: info[20],
|
||||||
gradeEn: info[i++],
|
gradeEn: info[21],
|
||||||
gradeCn: info[i++],
|
gradeCn: info[22],
|
||||||
deptNameEn: info[i++],
|
deptNameEn: info[23],
|
||||||
deptNameCn: info[i++],
|
deptNameCn: info[24],
|
||||||
deptSeq: info[i++],
|
deptSeq: info[25],
|
||||||
isPrivacyAgree: info[i++] === 'Y' ? true : false,
|
isPrivacyAgree: info[26] === 'Y' ? true : false,
|
||||||
isValidLogin: info[i++] === 'Y' ? true : false,
|
isValidLogin: info[27] === 'Y' ? true : false,
|
||||||
employeeType: info[i++] as EmployeeType
|
employeeType: info[28] as EmployeeType
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -67,19 +67,18 @@ export const decodeDeptData: ProtocolDecoder<DeptData> = (
|
||||||
const departmentInfos: DeptInfo[] = [];
|
const departmentInfos: DeptInfo[] = [];
|
||||||
message.bodyList.slice(1).forEach(deptInfo => {
|
message.bodyList.slice(1).forEach(deptInfo => {
|
||||||
const info = deptInfo.split(BodyStringDivider);
|
const info = deptInfo.split(BodyStringDivider);
|
||||||
let i = 0;
|
|
||||||
departmentInfos.push({
|
departmentInfos.push({
|
||||||
seq: Number(info[i]),
|
seq: Number(info[0]),
|
||||||
name: info[i++],
|
name: info[1],
|
||||||
companyCode: info[i++],
|
companyCode: info[2],
|
||||||
type: info[i++] as DeptType,
|
type: info[3] as DeptType,
|
||||||
rootSeq: Number(info[i++]),
|
rootSeq: Number(info[4]),
|
||||||
parentSeq: Number(info[i++]),
|
parentSeq: Number(info[5]),
|
||||||
order: info[i++],
|
order: info[6],
|
||||||
depth: Number(info[i++]),
|
depth: Number(info[7]),
|
||||||
isActive: info[i++] === 'Y' ? true : false,
|
isActive: info[8] === 'Y' ? true : false,
|
||||||
nameEn: info[i++],
|
nameEn: info[9],
|
||||||
nameCn: info[i++]
|
nameCn: info[10]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -133,32 +133,31 @@ export const decodeUserDnData: ProtocolDecoder<UserDnData> = (
|
||||||
const userDnInfos: UserInfoDN[] = [];
|
const userDnInfos: UserInfoDN[] = [];
|
||||||
message.bodyList.slice(1).forEach(userDnInfo => {
|
message.bodyList.slice(1).forEach(userDnInfo => {
|
||||||
const info = userDnInfo.split(BodyStringDivider);
|
const info = userDnInfo.split(BodyStringDivider);
|
||||||
let i = 0;
|
|
||||||
userDnInfos.push({
|
userDnInfos.push({
|
||||||
seq: Number(info[i]),
|
seq: Number(info[0]),
|
||||||
name: info[i++],
|
name: info[1],
|
||||||
profileImageFile: info[i++],
|
profileImageFile: info[2],
|
||||||
grade: info[i++],
|
grade: info[3],
|
||||||
intro: info[i++],
|
intro: info[4],
|
||||||
companyCode: info[i++],
|
companyCode: info[5],
|
||||||
hpNumber: info[i++],
|
hpNumber: info[6],
|
||||||
lineNumber: info[i++],
|
lineNumber: info[7],
|
||||||
email: info[i++],
|
email: info[8],
|
||||||
isMobile: info[i++] === 'Y' ? true : false,
|
isMobile: info[9] === 'Y' ? true : false,
|
||||||
order: info[i++],
|
order: info[10],
|
||||||
isActive: info[i++] === 'Y' ? true : false,
|
isActive: info[11] === 'Y' ? true : false,
|
||||||
roleCd: info[i++] as RoleCode,
|
roleCd: info[12] as RoleCode,
|
||||||
employeeNum: info[i++],
|
employeeNum: info[13],
|
||||||
deptName: info[i++],
|
deptName: info[14],
|
||||||
madn: info[i++],
|
madn: info[15],
|
||||||
hardSadn: info[i++],
|
hardSadn: info[16],
|
||||||
fmcSadn: info[i++],
|
fmcSadn: info[17],
|
||||||
nameEn: info[i++],
|
nameEn: info[18],
|
||||||
nameCn: info[i++],
|
nameCn: info[19],
|
||||||
gradeEn: info[i++],
|
gradeEn: info[20],
|
||||||
gradeCn: info[i++],
|
gradeCn: info[21],
|
||||||
deptNameEn: info[i++],
|
deptNameEn: info[22],
|
||||||
deptNameCn: info[i++]
|
deptNameCn: info[23]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -122,37 +122,36 @@ export const decodeUserSeqData: ProtocolDecoder<UserSeqData> = (
|
||||||
const userInfos: UserInfoF[] = [];
|
const userInfos: UserInfoF[] = [];
|
||||||
message.bodyList.slice(1).forEach(userInfo => {
|
message.bodyList.slice(1).forEach(userInfo => {
|
||||||
const info = userInfo.split(BodyStringDivider);
|
const info = userInfo.split(BodyStringDivider);
|
||||||
let i = 0;
|
|
||||||
userInfos.push({
|
userInfos.push({
|
||||||
seq: Number(info[i]),
|
seq: Number(info[0]),
|
||||||
name: info[i++],
|
name: info[1],
|
||||||
profileImageFile: info[i++],
|
profileImageFile: info[2],
|
||||||
grade: info[i++],
|
grade: info[3],
|
||||||
intro: info[i++],
|
intro: info[4],
|
||||||
companyCode: info[i++],
|
companyCode: info[5],
|
||||||
hpNumber: info[i++],
|
hpNumber: info[6],
|
||||||
lineNumber: info[i++],
|
lineNumber: info[7],
|
||||||
email: info[i++],
|
email: info[8],
|
||||||
isMobile: info[i++] === 'Y' ? true : false,
|
isMobile: info[9] === 'Y' ? true : false,
|
||||||
deptName: info[i++],
|
deptName: info[10],
|
||||||
isFavorit: info[i++] === 'Y' ? true : false,
|
isFavorit: info[11] === 'Y' ? true : false,
|
||||||
isBuddy: info[i++] === 'Y' ? true : false,
|
isBuddy: info[12] === 'Y' ? true : false,
|
||||||
isActive: info[i++] === 'Y' ? true : false,
|
isActive: info[13] === 'Y' ? true : false,
|
||||||
roleCd: info[i++] as RoleCode,
|
roleCd: info[14] as RoleCode,
|
||||||
employeeNum: info[i++],
|
employeeNum: info[15],
|
||||||
madn: info[i++],
|
madn: info[16],
|
||||||
hardSadn: info[i++],
|
hardSadn: info[17],
|
||||||
fmcSadn: info[i++],
|
fmcSadn: info[18],
|
||||||
nameEn: info[i++],
|
nameEn: info[19],
|
||||||
nameCn: info[i++],
|
nameCn: info[20],
|
||||||
gradeEn: info[i++],
|
gradeEn: info[21],
|
||||||
gradeCn: info[i++],
|
gradeCn: info[22],
|
||||||
deptNameEn: info[i++],
|
deptNameEn: info[23],
|
||||||
deptNameCn: info[i++],
|
deptNameCn: info[24],
|
||||||
isPrivacyAgree: info[i++] === 'Y' ? true : false,
|
isPrivacyAgree: info[25] === 'Y' ? true : false,
|
||||||
isValidLogin: info[i++] === 'Y' ? true : false,
|
isValidLogin: info[26] === 'Y' ? true : false,
|
||||||
employeeType: info[i++] as EmployeeType,
|
employeeType: info[27] as EmployeeType,
|
||||||
nickName: info[i++]
|
nickName: info[28]
|
||||||
} as UserInfoF);
|
} as UserInfoF);
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
|
@ -167,37 +166,36 @@ export const decodeUserSeqData2: ProtocolDecoder<UserSeqData2> = (
|
||||||
const userInfos: UserInfoSS[] = [];
|
const userInfos: UserInfoSS[] = [];
|
||||||
message.bodyList.slice(1).forEach(userInfo => {
|
message.bodyList.slice(1).forEach(userInfo => {
|
||||||
const info = userInfo.split(BodyStringDivider);
|
const info = userInfo.split(BodyStringDivider);
|
||||||
let i = 0;
|
|
||||||
userInfos.push({
|
userInfos.push({
|
||||||
seq: Number(info[i]),
|
seq: Number(info[0]),
|
||||||
name: info[i++],
|
name: info[1],
|
||||||
profileImageFile: info[i++],
|
profileImageFile: info[2],
|
||||||
grade: info[i++],
|
grade: info[3],
|
||||||
intro: info[i++],
|
intro: info[4],
|
||||||
companyCode: info[i++],
|
companyCode: info[5],
|
||||||
hpNumber: info[i++],
|
hpNumber: info[6],
|
||||||
lineNumber: info[i++],
|
lineNumber: info[7],
|
||||||
email: info[i++],
|
email: info[8],
|
||||||
isMobile: info[i++] === 'Y' ? true : false,
|
isMobile: info[9] === 'Y' ? true : false,
|
||||||
deptName: info[i++],
|
deptName: info[10],
|
||||||
order: info[i++],
|
order: info[11],
|
||||||
isActive: info[i++] === 'Y' ? true : false,
|
isActive: info[12] === 'Y' ? true : false,
|
||||||
roleCd: info[i++] as RoleCode,
|
roleCd: info[13] as RoleCode,
|
||||||
employeeNum: info[i++],
|
employeeNum: info[14],
|
||||||
madn: info[i++],
|
madn: info[15],
|
||||||
hardSadn: info[i++],
|
hardSadn: info[16],
|
||||||
fmcSadn: info[i++],
|
fmcSadn: info[17],
|
||||||
callMode: info[i++],
|
callMode: info[18],
|
||||||
nameEn: info[i++],
|
nameEn: info[19],
|
||||||
nameCn: info[i++],
|
nameCn: info[20],
|
||||||
gradeEn: info[i++],
|
gradeEn: info[21],
|
||||||
gradeCn: info[i++],
|
gradeCn: info[22],
|
||||||
deptNameEn: info[i++],
|
deptNameEn: info[23],
|
||||||
deptNameCn: info[i++],
|
deptNameCn: info[24],
|
||||||
deptSeq: info[i++],
|
deptSeq: info[25],
|
||||||
isPrivacyAgree: info[i++] === 'Y' ? true : false,
|
isPrivacyAgree: info[26] === 'Y' ? true : false,
|
||||||
isValidLogin: info[i++] === 'Y' ? true : false,
|
isValidLogin: info[27] === 'Y' ? true : false,
|
||||||
employeeType: info[i++] as EmployeeType
|
employeeType: info[28] as EmployeeType
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -18,16 +18,15 @@ export const decodeBuddy: ProtocolDecoder<BuddyResponse> = (
|
||||||
const statusInfos: StatusInfo[] = [];
|
const statusInfos: StatusInfo[] = [];
|
||||||
message.bodyList.forEach(statusInfo => {
|
message.bodyList.forEach(statusInfo => {
|
||||||
const info = statusInfo.split(BodyStringDivider);
|
const info = statusInfo.split(BodyStringDivider);
|
||||||
let idx = 0;
|
|
||||||
statusInfos.push({
|
statusInfos.push({
|
||||||
userSeq: Number(info[idx]),
|
userSeq: Number(info[0]),
|
||||||
pcStatus: info[idx++] as StatusCode,
|
pcStatus: info[1] as StatusCode,
|
||||||
phoneStatus: info[idx++] as StatusCode,
|
phoneStatus: info[2] as StatusCode,
|
||||||
mobileStatus: info[idx++] as StatusCode,
|
mobileStatus: info[3] as StatusCode,
|
||||||
conferenceStatus: info[idx++] as StatusCode,
|
conferenceStatus: info[4] as StatusCode,
|
||||||
statusMessage: info[idx++],
|
statusMessage: info[5],
|
||||||
mobileConferenceStatus: info[idx++] as StatusCode,
|
mobileConferenceStatus: info[6] as StatusCode,
|
||||||
imessengerStatus: info[idx++] as StatusCode
|
imessengerStatus: info[7] as StatusCode
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -74,18 +74,17 @@ export const decodeBulkInfoData: ProtocolDecoder<BulkInfoData> = (
|
||||||
const statusBulkInfos: StatusBulkInfo[] = [];
|
const statusBulkInfos: StatusBulkInfo[] = [];
|
||||||
message.bodyList.slice(1).forEach(statusBulkInfo => {
|
message.bodyList.slice(1).forEach(statusBulkInfo => {
|
||||||
const info = statusBulkInfo.split(BodyStringDivider);
|
const info = statusBulkInfo.split(BodyStringDivider);
|
||||||
let idx = 0;
|
|
||||||
statusBulkInfos.push({
|
statusBulkInfos.push({
|
||||||
userSeq: Number(info[idx]),
|
userSeq: Number(info[0]),
|
||||||
pcStatus: info[idx++] as StatusCode,
|
pcStatus: info[1] as StatusCode,
|
||||||
phoneStatus: info[idx++] as StatusCode,
|
phoneStatus: info[2] as StatusCode,
|
||||||
mobileStatus: info[idx++] as StatusCode,
|
mobileStatus: info[3] as StatusCode,
|
||||||
conferenceStatus: info[idx++] as StatusCode,
|
conferenceStatus: info[4] as StatusCode,
|
||||||
statusMessage: info[idx++],
|
statusMessage: info[5],
|
||||||
mobileConferenceStatus: info[idx++] as StatusCode,
|
mobileConferenceStatus: info[6] as StatusCode,
|
||||||
imessengerStatus: info[idx++] as StatusCode,
|
imessengerStatus: info[7] as StatusCode,
|
||||||
terminalStatus: info[idx++] as TerminalStatusInfo,
|
terminalStatus: info[8] as TerminalStatusInfo,
|
||||||
terminalStatusNumber: Number(info[idx++]) as TerminalStatusNumber
|
terminalStatusNumber: Number(info[9]) as TerminalStatusNumber
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -82,15 +82,14 @@ export const decodeStatusNotification: ProtocolDecoder<StatusNotification> = (
|
||||||
message: ProtocolMessage
|
message: ProtocolMessage
|
||||||
) => {
|
) => {
|
||||||
const info = message.bodyList[0].split(BodyStringDivider);
|
const info = message.bodyList[0].split(BodyStringDivider);
|
||||||
let idx = 0;
|
|
||||||
return {
|
return {
|
||||||
userSeq: Number(info[idx]),
|
userSeq: Number(info[0]),
|
||||||
pcStatus: info[idx++] as StatusCode,
|
pcStatus: info[1] as StatusCode,
|
||||||
phoneStatus: info[idx++] as StatusCode,
|
phoneStatus: info[2] as StatusCode,
|
||||||
mobileStatus: info[idx++] as StatusCode,
|
mobileStatus: info[3] as StatusCode,
|
||||||
conferenceStatus: info[idx++] as StatusCode,
|
conferenceStatus: info[4] as StatusCode,
|
||||||
statusMessage: info[idx++],
|
statusMessage: info[5],
|
||||||
mobileConferenceStatus: info[idx++] as StatusCode,
|
mobileConferenceStatus: info[6] as StatusCode,
|
||||||
imessengerStatus: info[idx++] as StatusCode
|
imessengerStatus: info[7] as StatusCode
|
||||||
} as StatusNotification;
|
} as StatusNotification;
|
||||||
};
|
};
|
||||||
|
|
|
@ -47,16 +47,15 @@ export const decodeSubscribe: ProtocolDecoder<SubscribeResponse> = (
|
||||||
const statusInfos: StatusInfo[] = [];
|
const statusInfos: StatusInfo[] = [];
|
||||||
message.bodyList.forEach(statusInfo => {
|
message.bodyList.forEach(statusInfo => {
|
||||||
const info = statusInfo.split(BodyStringDivider);
|
const info = statusInfo.split(BodyStringDivider);
|
||||||
let idx = 0;
|
|
||||||
statusInfos.push({
|
statusInfos.push({
|
||||||
userSeq: Number(info[idx]),
|
userSeq: Number(info[0]),
|
||||||
pcStatus: info[idx++] as StatusCode,
|
pcStatus: info[1] as StatusCode,
|
||||||
phoneStatus: info[idx++] as StatusCode,
|
phoneStatus: info[2] as StatusCode,
|
||||||
mobileStatus: info[idx++] as StatusCode,
|
mobileStatus: info[3] as StatusCode,
|
||||||
conferenceStatus: info[idx++] as StatusCode,
|
conferenceStatus: info[4] as StatusCode,
|
||||||
statusMessage: info[idx++],
|
statusMessage: info[5],
|
||||||
mobileConferenceStatus: info[idx++] as StatusCode,
|
mobileConferenceStatus: info[6] as StatusCode,
|
||||||
imessengerStatus: info[idx++] as StatusCode
|
imessengerStatus: info[7] as StatusCode
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
|
@ -74,16 +73,15 @@ export const decodeSubscribeData: ProtocolDecoder<SubscribeData> = (
|
||||||
const statusInfos: StatusInfo[] = [];
|
const statusInfos: StatusInfo[] = [];
|
||||||
message.bodyList.forEach(statusInfo => {
|
message.bodyList.forEach(statusInfo => {
|
||||||
const info = statusInfo.split(BodyStringDivider);
|
const info = statusInfo.split(BodyStringDivider);
|
||||||
let idx = 0;
|
|
||||||
statusInfos.push({
|
statusInfos.push({
|
||||||
userSeq: Number(info[idx]),
|
userSeq: Number(info[0]),
|
||||||
pcStatus: info[idx++] as StatusCode,
|
pcStatus: info[1] as StatusCode,
|
||||||
phoneStatus: info[idx++] as StatusCode,
|
phoneStatus: info[2] as StatusCode,
|
||||||
mobileStatus: info[idx++] as StatusCode,
|
mobileStatus: info[3] as StatusCode,
|
||||||
conferenceStatus: info[idx++] as StatusCode,
|
conferenceStatus: info[4] as StatusCode,
|
||||||
statusMessage: info[idx++],
|
statusMessage: info[5],
|
||||||
mobileConferenceStatus: info[idx++] as StatusCode,
|
mobileConferenceStatus: info[6] as StatusCode,
|
||||||
imessengerStatus: info[idx++] as StatusCode
|
imessengerStatus: info[7] as StatusCode
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user