@onyx-p/imlib-web 1.3.4 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +11 -9
- package/index.umd.js +11 -9
- package/package.json +1 -1
package/index.esm.js
CHANGED
@@ -8017,9 +8017,9 @@ var CmdIds;
|
|
8017
8017
|
CmdIds[CmdIds["DeletePrivateDialog"] = 1610682372] = "DeletePrivateDialog";
|
8018
8018
|
CmdIds[CmdIds["DeleteGroupDialog"] = 1610747908] = "DeleteGroupDialog";
|
8019
8019
|
CmdIds[CmdIds["GetDialogChangedStatus"] = 1610711094] = "GetDialogChangedStatus";
|
8020
|
+
CmdIds[CmdIds["HeartbeanResp"] = 268468225] = "HeartbeanResp";
|
8020
8021
|
CmdIds[CmdIds["NewMessagePush"] = 1610711040] = "NewMessagePush";
|
8021
8022
|
CmdIds[CmdIds["DialogChangedPush"] = 1610711096] = "DialogChangedPush";
|
8022
|
-
CmdIds[CmdIds["AppAllowLoginPush"] = 806453286] = "AppAllowLoginPush";
|
8023
8023
|
CmdIds[CmdIds["SessionKilledPush"] = 268468229] = "SessionKilledPush";
|
8024
8024
|
CmdIds[CmdIds["SignOutPish"] = 268439559] = "SignOutPish";
|
8025
8025
|
CmdIds[CmdIds["SignOutPish2"] = 268468231] = "SignOutPish2";
|
@@ -13394,7 +13394,9 @@ class WebSocketServer {
|
|
13394
13394
|
body: body,
|
13395
13395
|
deviceType: 7
|
13396
13396
|
};
|
13397
|
-
|
13397
|
+
if (cmdId !== CmdIds$1.Heartbean) {
|
13398
|
+
logger.info(`websocket send -> cmd: 0x${cmdId.toString(16)}, messageSeq: ${messageSeq}`);
|
13399
|
+
}
|
13398
13400
|
this.socket.send(buildWsPacketData(rpc_baseExports.NetworkRequest.encode(networkReq).finish()));
|
13399
13401
|
const respData = await new Promise(resolve => {
|
13400
13402
|
this.responseCallbacks.set(messageSeq, resolve);
|
@@ -13513,7 +13515,9 @@ class WebSocketServer {
|
|
13513
13515
|
return;
|
13514
13516
|
}
|
13515
13517
|
const messageSeq = Long.isLong(networkResponse.messageSeq) ? networkResponse.messageSeq.toNumber() : 0;
|
13516
|
-
|
13518
|
+
if (networkResponse.cmdId !== CmdIds$1.HeartbeanResp) {
|
13519
|
+
logger.info(`websocket recv ack -> messageSeq: ${messageSeq}`);
|
13520
|
+
}
|
13517
13521
|
const resolve = this.responseCallbacks.get(messageSeq);
|
13518
13522
|
if (isDef(resolve)) {
|
13519
13523
|
resolve(networkResponse.body);
|
@@ -19258,7 +19262,7 @@ class ConversationStatus {
|
|
19258
19262
|
data
|
19259
19263
|
} = await getDialogChangedStatus(offset);
|
19260
19264
|
if (code === ErrorCode.SUCCESS) {
|
19261
|
-
if (data.setTime.toNumber() > 0) {
|
19265
|
+
if (Long.isLong(data.setTime) && data.setTime.toNumber() > 0) {
|
19262
19266
|
SecureStorageService.set(this.storageKey, data.setTime.toNumber());
|
19263
19267
|
}
|
19264
19268
|
if (data.briefDialog) {
|
@@ -19752,7 +19756,6 @@ class MessageLoader {
|
|
19752
19756
|
};
|
19753
19757
|
});
|
19754
19758
|
ConversationManager$1.get().loadConvsationsIfNotExist(cons);
|
19755
|
-
debugger;
|
19756
19759
|
ServerMessageParser.parse(msg, (done, outputMsgs) => {
|
19757
19760
|
const messages = [];
|
19758
19761
|
const conversations = [];
|
@@ -19805,7 +19808,7 @@ class MessageLoader {
|
|
19805
19808
|
}
|
19806
19809
|
}
|
19807
19810
|
|
19808
|
-
const DEFAULT_SOCKET_URI = 'wss://
|
19811
|
+
const DEFAULT_SOCKET_URI = 'wss://imweb.mp.net:6443';
|
19809
19812
|
class LibLoader {
|
19810
19813
|
options;
|
19811
19814
|
connectionStatus = ConnectionStatus.DISCONNECTED;
|
@@ -19831,7 +19834,8 @@ class LibLoader {
|
|
19831
19834
|
onSuspend: undefined,
|
19832
19835
|
pullFinished: undefined,
|
19833
19836
|
batchMessage: undefined,
|
19834
|
-
conversationState: undefined
|
19837
|
+
conversationState: undefined,
|
19838
|
+
onPush: undefined
|
19835
19839
|
};
|
19836
19840
|
webSocketServer.setServerInfo(this.getWebSocketUrl());
|
19837
19841
|
webSocketServer.setCallback({
|
@@ -19960,7 +19964,6 @@ class LibLoader {
|
|
19960
19964
|
}, 2000);
|
19961
19965
|
}
|
19962
19966
|
messageListener(cmdId, body) {
|
19963
|
-
logger.info(`libLoader messageListener -> cmdId: ${cmdId}, body: ${body}`);
|
19964
19967
|
if (cmdId === CmdIds$1.NewMessagePush) {
|
19965
19968
|
const newMsgNotiResp = NewMessageNotificationResp.decode(body);
|
19966
19969
|
this.messageLoader?.syncMsg(newMsgNotiResp.seqno);
|
@@ -26842,7 +26845,6 @@ class IMClient extends EventEmitter {
|
|
26842
26845
|
});
|
26843
26846
|
},
|
26844
26847
|
onPush: (cmdId, body) => {
|
26845
|
-
logger.info(`client onPush -> cmdId: ${cmdId}, body: ${body}`);
|
26846
26848
|
this.emit(Events.PUSH, {
|
26847
26849
|
cmdId,
|
26848
26850
|
body
|
package/index.umd.js
CHANGED
@@ -8023,9 +8023,9 @@
|
|
8023
8023
|
CmdIds[CmdIds["DeletePrivateDialog"] = 1610682372] = "DeletePrivateDialog";
|
8024
8024
|
CmdIds[CmdIds["DeleteGroupDialog"] = 1610747908] = "DeleteGroupDialog";
|
8025
8025
|
CmdIds[CmdIds["GetDialogChangedStatus"] = 1610711094] = "GetDialogChangedStatus";
|
8026
|
+
CmdIds[CmdIds["HeartbeanResp"] = 268468225] = "HeartbeanResp";
|
8026
8027
|
CmdIds[CmdIds["NewMessagePush"] = 1610711040] = "NewMessagePush";
|
8027
8028
|
CmdIds[CmdIds["DialogChangedPush"] = 1610711096] = "DialogChangedPush";
|
8028
|
-
CmdIds[CmdIds["AppAllowLoginPush"] = 806453286] = "AppAllowLoginPush";
|
8029
8029
|
CmdIds[CmdIds["SessionKilledPush"] = 268468229] = "SessionKilledPush";
|
8030
8030
|
CmdIds[CmdIds["SignOutPish"] = 268439559] = "SignOutPish";
|
8031
8031
|
CmdIds[CmdIds["SignOutPish2"] = 268468231] = "SignOutPish2";
|
@@ -13400,7 +13400,9 @@
|
|
13400
13400
|
body: body,
|
13401
13401
|
deviceType: 7
|
13402
13402
|
};
|
13403
|
-
|
13403
|
+
if (cmdId !== CmdIds$1.Heartbean) {
|
13404
|
+
logger.info(`websocket send -> cmd: 0x${cmdId.toString(16)}, messageSeq: ${messageSeq}`);
|
13405
|
+
}
|
13404
13406
|
this.socket.send(buildWsPacketData(rpc_baseExports.NetworkRequest.encode(networkReq).finish()));
|
13405
13407
|
const respData = await new Promise(resolve => {
|
13406
13408
|
this.responseCallbacks.set(messageSeq, resolve);
|
@@ -13519,7 +13521,9 @@
|
|
13519
13521
|
return;
|
13520
13522
|
}
|
13521
13523
|
const messageSeq = Long.isLong(networkResponse.messageSeq) ? networkResponse.messageSeq.toNumber() : 0;
|
13522
|
-
|
13524
|
+
if (networkResponse.cmdId !== CmdIds$1.HeartbeanResp) {
|
13525
|
+
logger.info(`websocket recv ack -> messageSeq: ${messageSeq}`);
|
13526
|
+
}
|
13523
13527
|
const resolve = this.responseCallbacks.get(messageSeq);
|
13524
13528
|
if (isDef(resolve)) {
|
13525
13529
|
resolve(networkResponse.body);
|
@@ -19264,7 +19268,7 @@
|
|
19264
19268
|
data
|
19265
19269
|
} = await getDialogChangedStatus(offset);
|
19266
19270
|
if (code === exports.ErrorCode.SUCCESS) {
|
19267
|
-
if (data.setTime.toNumber() > 0) {
|
19271
|
+
if (Long.isLong(data.setTime) && data.setTime.toNumber() > 0) {
|
19268
19272
|
SecureStorageService.set(this.storageKey, data.setTime.toNumber());
|
19269
19273
|
}
|
19270
19274
|
if (data.briefDialog) {
|
@@ -19758,7 +19762,6 @@
|
|
19758
19762
|
};
|
19759
19763
|
});
|
19760
19764
|
ConversationManager$1.get().loadConvsationsIfNotExist(cons);
|
19761
|
-
debugger;
|
19762
19765
|
ServerMessageParser.parse(msg, (done, outputMsgs) => {
|
19763
19766
|
const messages = [];
|
19764
19767
|
const conversations = [];
|
@@ -19811,7 +19814,7 @@
|
|
19811
19814
|
}
|
19812
19815
|
}
|
19813
19816
|
|
19814
|
-
const DEFAULT_SOCKET_URI = 'wss://
|
19817
|
+
const DEFAULT_SOCKET_URI = 'wss://imweb.mp.net:6443';
|
19815
19818
|
class LibLoader {
|
19816
19819
|
options;
|
19817
19820
|
connectionStatus = exports.ConnectionStatus.DISCONNECTED;
|
@@ -19837,7 +19840,8 @@
|
|
19837
19840
|
onSuspend: undefined,
|
19838
19841
|
pullFinished: undefined,
|
19839
19842
|
batchMessage: undefined,
|
19840
|
-
conversationState: undefined
|
19843
|
+
conversationState: undefined,
|
19844
|
+
onPush: undefined
|
19841
19845
|
};
|
19842
19846
|
webSocketServer.setServerInfo(this.getWebSocketUrl());
|
19843
19847
|
webSocketServer.setCallback({
|
@@ -19966,7 +19970,6 @@
|
|
19966
19970
|
}, 2000);
|
19967
19971
|
}
|
19968
19972
|
messageListener(cmdId, body) {
|
19969
|
-
logger.info(`libLoader messageListener -> cmdId: ${cmdId}, body: ${body}`);
|
19970
19973
|
if (cmdId === CmdIds$1.NewMessagePush) {
|
19971
19974
|
const newMsgNotiResp = NewMessageNotificationResp.decode(body);
|
19972
19975
|
this.messageLoader?.syncMsg(newMsgNotiResp.seqno);
|
@@ -26848,7 +26851,6 @@
|
|
26848
26851
|
});
|
26849
26852
|
},
|
26850
26853
|
onPush: (cmdId, body) => {
|
26851
|
-
logger.info(`client onPush -> cmdId: ${cmdId}, body: ${body}`);
|
26852
26854
|
this.emit(exports.Events.PUSH, {
|
26853
26855
|
cmdId,
|
26854
26856
|
body
|