@uniquedivine/tg-sai 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/profiles.ts +7 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniquedivine/tg-sai",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "description": "Sai Telegram admin audit and bootstrap CLI",
package/profiles.ts CHANGED
@@ -291,9 +291,14 @@ export async function addProfile(
291
291
  const previous = config.profiles[input.name]
292
292
  const timestamp = now.toISOString()
293
293
  config.profiles[input.name] = {
294
- ...previous,
295
- ...input,
294
+ name: input.name,
295
+ apiId: input.apiId ?? previous?.apiId ?? null,
296
+ apiHash: input.apiHash || previous?.apiHash || "",
297
+ sessionString: input.sessionString || previous?.sessionString || "",
296
298
  password: input.password || previous?.password || "",
299
+ handle: input.handle ?? previous?.handle ?? null,
300
+ userId: input.userId ?? previous?.userId ?? null,
301
+ displayName: input.displayName || previous?.displayName || "",
297
302
  createdAt: previous?.createdAt ?? timestamp,
298
303
  updatedAt: timestamp,
299
304
  }