mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-13 11:56:03 +00:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user