Files
simplex-chat/packages/simplex-chat-nodejs/src
Narasimha-sc bc1e8b6de7 core: allow creating a user without making it active
Adds keepActiveUser to NewUser. When set, the new user is created but the
current active user is preserved.

This is needed to create a profile for an invitation: the prepared chat is
resolved under the active user by APIChangePreparedContactUser, so the profile
that owns the invitation has to stay active until the chat has been moved to
the new one. Creating and activating in one step makes that reassignment
impossible without switching back and forth.

BoolDef gives the field omittedField = False, so clients that do not send it -
iOS, the CLI, and any older caller - keep the current behaviour of activating
the new user.

keepActiveUser is ignored when there is no active user to keep, which would
otherwise leave the app with none at all.

Note the response is still CRActiveUser: it carries the created user, which is
not the active one on this path. Documented at the field.

Regenerates the API docs and the generated TypeScript and Python client types,
which are checked by the Bot API docs tests.

The generator emits BoolDef fields as required in the client types, so the two
hand-maintained clients that build a NewUser literal - simplex-chat-python and
simplex-chat-nodejs - stop type-checking until the field is added there too. No
test covers those; a4e3a1ea1 did the same when clientService was added.
2026-08-03 07:59:49 +00:00
..