simplex-chat-nodejs: fix userChatRelay type error in apiCreateActiveUser (#6764)

The @simplex-chat/types package (auto-generated from Haskell types) added
a required `userChatRelay: boolean` field to the NewUser interface, but
apiCreateActiveUser was never updated to pass it, causing a TypeScript
compilation error.

Set userChatRelay to false, which preserves the pre-existing behavior
(no chat relay provisioned for the new user profile).
This commit is contained in:
Narasimha-sc
2026-04-09 11:37:21 +00:00
committed by GitHub
parent 7194755f8d
commit e3003fd1f5

View File

@@ -813,7 +813,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}}))
const r = await this.sendChatCmd(CC.CreateActiveUser.cmdString({newUser: {profile, pastTimestamp: false, userChatRelay: false}}))
if (r.type === "activeUser") return r.user
throw new ChatCommandError("unexpected response", r)
}