@hiroosy/baileys-lite 0.4.1 → 0.4.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.
package/README.md CHANGED
@@ -1,18 +1,22 @@
1
- <div align=center><img src="https://files.catbox.moe/bzw1x3.png"/></div>
1
+ # Baileys-Lite
2
2
 
3
- <p align="center">
3
+ <p align="left">
4
4
  <a href="https://www.npmjs.com/package/@hiroosy/baileys-lite"><img height="25" alt="npm version" src="https://img.shields.io/npm/v/@hiroosy/baileys-lite?color=CB3837&style=for-the-badge&logo=npm" /></a>
5
5
  <a href="https://www.npmjs.com/package/@hiroosy/baileys-lite"><img height="25" alt="npm package size" src="https://img.shields.io/npm/unpacked-size/@hiroosy/baileys-lite?label=size&color=2F855A&style=for-the-badge&logo=npm" /></a>
6
6
  <img height="25" alt="node version" src="https://img.shields.io/badge/NodeJS_>=18-000000.svg?&style=for-the-badge&logo=node.js&logoColor=green" />
7
7
  </p>
8
8
 
9
- **High-Performance Javascript Baileys**, built for high-scalability workloads, multi-session operation, and full user configurability.
10
-
11
- - [x] Support LID/PN/Username.
12
- - [x] High performance for multi sessions.
13
- - [x] Zero dependency.
14
- - [x] Low memory & CPU consumption.
15
- - [x] Calls: Video & Audio, group calls, call links, and waiting rooms.
9
+ **High-Performance Javascript Baileys**, built for high-scalability workloads, built-in modules, multi-session operation, and full user configurability.
10
+
11
+ | Feature | Baileys-Lite | Whiskeysockets |
12
+ | --- | --- | --- |
13
+ | RAM usage | 80 mb | 150mb+ |
14
+ | Call | Yes | No |
15
+ | Ping | 8 ms | 200 ms |
16
+ | Multi sessions limit | 100+, still fast | 2-10, slow |
17
+ | LID/PN/Username | Yes, all | Only LID and PN |
18
+ | SQL session | Yes | No |
19
+ | Node required | >=18 | >=20 |
16
20
 
17
21
  ---
18
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiroosy/baileys-lite",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "A Lightweight Baileys built with Pure NodeJs 18+",
5
5
  "repository": {
6
6
  "type": "git",
@@ -69,10 +69,6 @@ export const makeSocket = config => {
69
69
  const uqTagId = generateMdTagPrefix()
70
70
  const generateMessageTag = () => `${uqTagId}${epoch++}`
71
71
 
72
- if (browser[1].toLocaleLowerCase().includes('android')) {
73
- logger.warn('⚠️ Using the Android browser is experimental and may lead to unexpected behavior. Use at your own risk.')
74
- }
75
-
76
72
  const syncDisabled = PROCESSABLE_HISTORY_TYPES.map(syncType => config.shouldSyncHistoryMessage({ syncType })).filter(x => x === false).length === PROCESSABLE_HISTORY_TYPES.length
77
73
  if (syncDisabled) {
78
74
  logger.warn('⚠️ DANGER: DISABLING ALL SYNC BY shouldSyncHistoryMsg PREVENTS BAILEYS FROM ACCESSING INITIAL LID MAPPINGS, LEADING TO INSTABILIY AND SESSION ERRORS')
@@ -890,9 +890,7 @@ const WA_ADV_HOSTED_ACCOUNT_SIG_PREFIX = Buffer.from([6, 5])
890
890
 
891
891
  const getUserAgent = config => ({
892
892
  appVersion: { primary: config.version[0], secondary: config.version[1], tertiary: config.version[2] },
893
- platform: config.browser[1].toLocaleLowerCase().includes('android')
894
- ? proto.ClientPayload.UserAgent.Platform.ANDROID
895
- : proto.ClientPayload.UserAgent.Platform.WEB,
893
+ platform: proto.ClientPayload.UserAgent.Platform.WEB,
896
894
  releaseChannel: proto.ClientPayload.UserAgent.ReleaseChannel.RELEASE,
897
895
  osVersion: '0.1',
898
896
  device: 'Desktop',
@@ -922,7 +920,7 @@ const getClientPayload = config => {
922
920
  connectReason: proto.ClientPayload.ConnectReason.USER_ACTIVATED,
923
921
  userAgent: getUserAgent(config)
924
922
  }
925
- if (!config.browser[1].toLocaleLowerCase().includes('android')) payload.webInfo = getWebInfo(config)
923
+ payload.webInfo = getWebInfo(config)
926
924
  if (config.pushName) payload.pushName = config.pushName
927
925
  return payload
928
926
  }
@@ -935,7 +933,7 @@ export const generateLoginNode = (userJid, config) => {
935
933
 
936
934
  const getPlatformType = platform => {
937
935
  const platformType = platform.toUpperCase()
938
- if (platformType === 'ANDROID') return proto.DeviceProps.PlatformType.ANDROID_PHONE
936
+ if (platformType === 'ANDROID') return proto.DeviceProps.PlatformType.UNKNOWN
939
937
  return proto.DeviceProps.PlatformType[platformType] || proto.DeviceProps.PlatformType.CHROME
940
938
  }
941
939