This commit is contained in:
2023-11-29 10:46:36 +08:00
parent 771932ab04
commit 61c64eec10
2 changed files with 15 additions and 13 deletions

View File

@@ -7,6 +7,7 @@
<sourceRoots> <sourceRoots>
<root url="file://$MODULE_DIR$/src/main/java" /> <root url="file://$MODULE_DIR$/src/main/java" />
<root url="file://$MODULE_DIR$/src/main/resources" /> <root url="file://$MODULE_DIR$/src/main/resources" />
<root url="file://$MODULE_DIR$/target/generated-sources/annotations" />
</sourceRoots> </sourceRoots>
</configuration> </configuration>
</facet> </facet>

View File

@@ -123,7 +123,7 @@ export class ImClient {
this.url = "wss://" + ip + "/hs_ws"; this.url = "wss://" + ip + "/hs_ws";
} }
} }
var req = new LoginPack(self.appId, self.userId, 1); var req = new LoginPack(self.appId, self.userId, 1);
@@ -296,7 +296,7 @@ export class ImClient {
resolve(resp); resolve(resp);
}) })
} }
public getUserSequence(): Promise<any> { public getUserSequence(): Promise<any> {
return new Promise((resolve, _) => { return new Promise((resolve, _) => {
let api = new HttpApi(this.httpUrl); let api = new HttpApi(this.httpUrl);
@@ -304,8 +304,8 @@ export class ImClient {
resolve(resp); resolve(resp);
}) })
} }
public getUserConversationList(lastSequence:Long): Promise<any> { public getUserConversationList(lastSequence:Long): Promise<any> {
return new Promise((resolve, _) => { return new Promise((resolve, _) => {
let api = new HttpApi(this.httpUrl); let api = new HttpApi(this.httpUrl);
@@ -372,8 +372,8 @@ export class ImClient {
this.conn.send(p2pPack.pack(false)); this.conn.send(p2pPack.pack(false));
} }
} }
// 消息接收ack // 消息接收ack
public sendP2PMessageReciveAck (rAck: any) { public sendP2PMessageReciveAck (rAck: any) {
console.log("=============== sendP2PMessageReciveAck") console.log("=============== sendP2PMessageReciveAck")
@@ -382,11 +382,12 @@ export class ImClient {
rAck.fromId = this.userId; rAck.fromId = this.userId;
console.log(rAck) console.log(rAck)
let p2pPack_1107 = imClient.buildMessagePack(MessageCommand.MSG_RECIVE_ACK, rAck);
let p2pPack_1107 = imClient.buildMessagePack(MessageCommand.MSG_RECIVE_ACK, rAck);// 1107
rAck.conversationType=0 rAck.conversationType=0
let p2pPack_1106 = imClient.buildMessagePack(MessageCommand.MSG_READED, rAck); let p2pPack_1106 = imClient.buildMessagePack(MessageCommand.MSG_READED, rAck); // 1106
let p2pPack_1054 = imClient.buildMessagePack(MessageCommand.MSG_READED_RECEIPT, rAck); let p2pPack_1054 = imClient.buildMessagePack(MessageCommand.MSG_READED_RECEIPT, rAck); // 1054
if (this.conn) { if (this.conn) {
@@ -406,12 +407,12 @@ export class ImClient {
rAck.fromId = this.userId; rAck.fromId = this.userId;
console.log(rAck) console.log(rAck)
let p2pPack = imClient.buildMessagePack(MessageCommand.MSG_READED_RECEIPT, rAck); let p2pPack = imClient.buildMessagePack(MessageCommand.MSG_READED_RECEIPT, rAck);
if (this.conn) { if (this.conn) {
console.log("=============== sendP2PMessageReadedRECEIPT 正式开始发送已读回执") console.log("=============== sendP2PMessageReadedRECEIPT 正式开始发送已读回执")
this.conn.send(p2pPack.pack(false)); this.conn.send(p2pPack.pack(false));
} }
} }
@@ -419,7 +420,7 @@ export class ImClient {
return this.userId; return this.userId;
} }
//拉取离线信息记录 //拉取离线信息记录
private async loadOfflineMessage() { private async loadOfflineMessage() {
log.info("loadOfflineMessage start") log.info("loadOfflineMessage start")
let api = new HttpApi(this.httpUrl); let api = new HttpApi(this.httpUrl);