simplex-chat: sync nodejs and python libs with 7.0.0-beta.3 types (#7219)

This commit is contained in:
sh
2026-07-08 12:01:17 +04:00
committed by GitHub
parent 8b537fbc3a
commit a4e3a1ea11
4 changed files with 12 additions and 10 deletions
+3 -3
View File
@@ -688,7 +688,7 @@ export class ChatApi {
* Network usage: interactive.
*/
async apiConnectPlan(userId: number, connectionLink: string): Promise<[T.ConnectionPlan, T.CreatedConnLink]> {
const r = await this.sendChatCmd(CC.APIConnectPlan.cmdString({userId, connectionLink, resolveKnown: false}))
const r = await this.sendChatCmd(CC.APIConnectPlan.cmdString({userId, connectTarget: connectionLink, resolveMode: T.PlanResolveMode.Unknown}))
if (r.type === "connectionPlan") return [r.connectionPlan, r.connLink]
throw new ChatCommandError("error getting connect plan", r)
}
@@ -707,7 +707,7 @@ export class ChatApi {
* Network usage: interactive.
*/
async apiConnectActiveUser(connLink: string): Promise<ConnReqType> {
const r = await this.sendChatCmd(CC.Connect.cmdString({incognito: false, connLink_: connLink}))
const r = await this.sendChatCmd(CC.Connect.cmdString({incognito: false, connTarget_: connLink}))
return this.handleConnectResult(r)
}
@@ -866,7 +866,7 @@ export class ChatApi {
* Network usage: no.
*/
async apiCreateActiveUser(profile?: T.Profile): Promise<T.User> {
const r = await this.sendChatCmd(CC.CreateActiveUser.cmdString({newUser: {profile, pastTimestamp: false, userChatRelay: false}}))
const r = await this.sendChatCmd(CC.CreateActiveUser.cmdString({newUser: {profile, pastTimestamp: false, userChatRelay: false, clientService: false}}))
if (r.type === "activeUser") return r.user
throw new ChatCommandError("unexpected response", r)
}