@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 +13 -9
- package/package.json +1 -1
- package/src/socket/socket-core.js +0 -4
- package/src/utils/wa-protocol-core.js +3 -5
package/README.md
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
# Baileys-Lite
|
|
2
2
|
|
|
3
|
-
<p align="
|
|
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
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
@@ -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:
|
|
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
|
-
|
|
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.
|
|
936
|
+
if (platformType === 'ANDROID') return proto.DeviceProps.PlatformType.UNKNOWN
|
|
939
937
|
return proto.DeviceProps.PlatformType[platformType] || proto.DeviceProps.PlatformType.CHROME
|
|
940
938
|
}
|
|
941
939
|
|