@itsliaaa/baileys 0.3.0-rc.1 → 0.3.0-rc.10
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 +213 -7
- package/WAProto/index.d.ts +15 -0
- package/WAProto/index.js +124 -0
- package/lib/Defaults/index.d.ts +6 -7
- package/lib/Defaults/index.d.ts.map +1 -1
- package/lib/Defaults/index.js +7 -8
- package/lib/Defaults/index.js.map +1 -1
- package/lib/Signal/libsignal.d.ts +13 -0
- package/lib/Signal/libsignal.d.ts.map +1 -1
- package/lib/Signal/libsignal.js +45 -17
- package/lib/Signal/libsignal.js.map +1 -1
- package/lib/Signal/lid-mapping.d.ts +4 -0
- package/lib/Signal/lid-mapping.d.ts.map +1 -1
- package/lib/Signal/lid-mapping.js +6 -0
- package/lib/Signal/lid-mapping.js.map +1 -1
- package/lib/Socket/business.d.ts +21 -2
- package/lib/Socket/business.d.ts.map +1 -1
- package/lib/Socket/business.js +1 -0
- package/lib/Socket/business.js.map +1 -1
- package/lib/Socket/chats.d.ts +10 -1
- package/lib/Socket/chats.d.ts.map +1 -1
- package/lib/Socket/chats.js +15 -6
- package/lib/Socket/chats.js.map +1 -1
- package/lib/Socket/communities.d.ts +22 -2
- package/lib/Socket/communities.d.ts.map +1 -1
- package/lib/Socket/communities.js +1 -0
- package/lib/Socket/communities.js.map +1 -1
- package/lib/Socket/groups.d.ts +11 -1
- package/lib/Socket/groups.d.ts.map +1 -1
- package/lib/Socket/groups.js +1 -0
- package/lib/Socket/groups.js.map +1 -1
- package/lib/Socket/index.d.ts +22 -2
- package/lib/Socket/index.d.ts.map +1 -1
- package/lib/Socket/messages-recv.d.ts +20 -2
- package/lib/Socket/messages-recv.d.ts.map +1 -1
- package/lib/Socket/messages-recv.js +399 -134
- package/lib/Socket/messages-recv.js.map +1 -1
- package/lib/Socket/messages-send.d.ts +20 -2
- package/lib/Socket/messages-send.d.ts.map +1 -1
- package/lib/Socket/messages-send.js +80 -42
- package/lib/Socket/messages-send.js.map +1 -1
- package/lib/Socket/newsletter.d.ts +15 -2
- package/lib/Socket/newsletter.d.ts.map +1 -1
- package/lib/Socket/newsletter.js +53 -12
- package/lib/Socket/newsletter.js.map +1 -1
- package/lib/Socket/socket.d.ts +9 -1
- package/lib/Socket/socket.d.ts.map +1 -1
- package/lib/Socket/socket.js +53 -21
- package/lib/Socket/socket.js.map +1 -1
- package/lib/Types/{Newsletter.d.ts → Mex.d.ts} +1 -1
- package/lib/Types/Mex.d.ts.map +1 -0
- package/lib/Types/{Newsletter.js → Mex.js} +5 -1
- package/lib/Types/Mex.js.map +1 -0
- package/lib/Types/State.d.ts +4 -0
- package/lib/Types/State.d.ts.map +1 -1
- package/lib/Types/State.js +43 -0
- package/lib/Types/State.js.map +1 -1
- package/lib/Types/index.d.ts +1 -1
- package/lib/Types/index.js +1 -1
- package/lib/Types/index.js.map +1 -1
- package/lib/Utils/chat-utils.d.ts +1 -1
- package/lib/Utils/chat-utils.d.ts.map +1 -1
- package/lib/Utils/chat-utils.js +46 -12
- package/lib/Utils/chat-utils.js.map +1 -1
- package/lib/Utils/decode-wa-message.d.ts +3 -1
- package/lib/Utils/decode-wa-message.d.ts.map +1 -1
- package/lib/Utils/decode-wa-message.js +8 -2
- package/lib/Utils/decode-wa-message.js.map +1 -1
- package/lib/Utils/event-buffer.d.ts +1 -0
- package/lib/Utils/event-buffer.d.ts.map +1 -1
- package/lib/Utils/event-buffer.js +47 -1
- package/lib/Utils/event-buffer.js.map +1 -1
- package/lib/Utils/generics.d.ts +1 -1
- package/lib/Utils/generics.d.ts.map +1 -1
- package/lib/Utils/generics.js +2 -2
- package/lib/Utils/generics.js.map +1 -1
- package/lib/Utils/history.d.ts +2 -0
- package/lib/Utils/history.d.ts.map +1 -1
- package/lib/Utils/history.js +1 -0
- package/lib/Utils/history.js.map +1 -1
- package/lib/Utils/link-preview.js +2 -2
- package/lib/Utils/link-preview.js.map +1 -1
- package/lib/Utils/message-retry-manager.d.ts +5 -0
- package/lib/Utils/message-retry-manager.d.ts.map +1 -1
- package/lib/Utils/message-retry-manager.js +41 -1
- package/lib/Utils/message-retry-manager.js.map +1 -1
- package/lib/Utils/messages-media.d.ts +2 -1
- package/lib/Utils/messages-media.d.ts.map +1 -1
- package/lib/Utils/messages-media.js +17 -8
- package/lib/Utils/messages-media.js.map +1 -1
- package/lib/Utils/messages.d.ts.map +1 -1
- package/lib/Utils/messages.js +31 -9
- package/lib/Utils/messages.js.map +1 -1
- package/lib/Utils/signal.d.ts +13 -0
- package/lib/Utils/signal.d.ts.map +1 -1
- package/lib/Utils/signal.js +42 -0
- package/lib/Utils/signal.js.map +1 -1
- package/lib/Utils/validate-connection.d.ts.map +1 -1
- package/lib/Utils/validate-connection.js +3 -0
- package/lib/Utils/validate-connection.js.map +1 -1
- package/lib/WAUSync/USyncQuery.js +1 -1
- package/lib/WAUSync/USyncQuery.js.map +1 -1
- package/package.json +35 -6
- package/lib/Types/Newsletter.d.ts.map +0 -1
- package/lib/Types/Newsletter.js.map +0 -1
package/README.md
CHANGED
|
@@ -81,6 +81,7 @@ This fork designed for production use with a focus on clarity and safety:
|
|
|
81
81
|
- 📦 [Sticker Pack Message](#-sticker-pack)
|
|
82
82
|
- ✨ [Rich Response Message](#-rich-response) **[NEW]**
|
|
83
83
|
- 🧾 [Message with Code Blocks](#-message-with-code-block) **[NEW]**
|
|
84
|
+
- [🌏 Message with Inline Entities](#-message-with-inline-entities) **[NEW]**
|
|
84
85
|
- 📋 [Message with Table](#-message-with-table) **[NEW]**
|
|
85
86
|
- 💳 [Payment-related Message](#-sending-payment-messages) (payment requests, invites, orders, invoices).
|
|
86
87
|
- 📰 Simplified sending messages with ad thumbnail using [`externalAdReply`](#3%EF%B8%8F⃣-external-ad-reply), without requiring manual `contextInfo`.
|
|
@@ -91,7 +92,7 @@ This fork designed for production use with a focus on clarity and safety:
|
|
|
91
92
|
- 👁️ Added optional boolean flags for message handling:
|
|
92
93
|
- 🤖 [`ai`](#1%EF%B8%8F⃣-ai-icon) - AI icon on message
|
|
93
94
|
- 📣 [`mentionAll`](#-mention) - Mention all group participants without requiring their JIDs in `mentions` or `mentionedJid` **[NEW]**
|
|
94
|
-
- 🔧 [`ephemeral`](#2%EF%B8%8F⃣-ephemeral), [`groupStatus`](#4%EF%B8%8F⃣-group-status), [`viewOnceV2`](#8%EF%B8%8F⃣-view-once-v2), [`viewOnceV2Extension`](#9%EF%B8%8F⃣-view-once-v2-extension), [`interactiveAsTemplate`](#3%EF%B8%8F⃣-interactive) - Message wrappers
|
|
95
|
+
- 🔧 [`ephemeral`](#2%EF%B8%8F⃣-ephemeral), [`groupStatus`](#4%EF%B8%8F⃣-group-status), [`spoiler`](#-spoiler), [`viewOnce`](#7%EF%B8%8F⃣-view-once), [`viewOnceV2`](#8%EF%B8%8F⃣-view-once-v2), [`viewOnceV2Extension`](#9%EF%B8%8F⃣-view-once-v2-extension), [`interactiveAsTemplate`](#3%EF%B8%8F⃣-interactive) - Message wrappers
|
|
95
96
|
- 🔒 [`secureMetaServiceLabel`](#6%EF%B8%8F⃣-secure-meta-service-label) - Secure meta service label on message **[NEW]**
|
|
96
97
|
- 📄 [`raw`](#5%EF%B8%8F⃣-raw) - Build your message manually **(DO NOT USE FOR EXPLOITATION)**
|
|
97
98
|
|
|
@@ -152,6 +153,7 @@ This fork designed for production use with a focus on clarity and safety:
|
|
|
152
153
|
- [7️⃣ View Once](#7%EF%B8%8F⃣-view-once)
|
|
153
154
|
- [8️⃣ View Once V2](#8%EF%B8%8F⃣-view-once-v2)
|
|
154
155
|
- [9️⃣ View Once V2 Extension](#9%EF%B8%8F⃣-view-once-v2-extension)
|
|
156
|
+
- [🔟 Spoiler](#-spoiler)
|
|
155
157
|
- [♻️ Modify Messages](#%EF%B8%8F-modify-messages)
|
|
156
158
|
- [🗑️ Delete Messages](#%EF%B8%8F-delete-messages)
|
|
157
159
|
- [✏️ Edit Messages](#%EF%B8%8F-edit-messages)
|
|
@@ -161,7 +163,9 @@ This fork designed for production use with a focus on clarity and safety:
|
|
|
161
163
|
- [🖼️ Image Processing](#%EF%B8%8F-image-processing)
|
|
162
164
|
- [📣 Newsletter Management](#-newsletter-management)
|
|
163
165
|
- [👥 Group Management](#-group-management)
|
|
166
|
+
- [👥 Community Management](#-community-management)
|
|
164
167
|
- [👤 Profile Management](#-profile-management)
|
|
168
|
+
- [🛒 Business Management](#-business-management)
|
|
165
169
|
- [🔐 Privacy Management](#-privacy-management)
|
|
166
170
|
- [📡 Events](#-events)
|
|
167
171
|
- [🚀 Try the Bot](#-try-the-bot)
|
|
@@ -410,7 +414,7 @@ sock.sendMessage(jid, {
|
|
|
410
414
|
} // --- Additional metadata for large link preview
|
|
411
415
|
},
|
|
412
416
|
favicon: {
|
|
413
|
-
url: './path/to/tiny-image.
|
|
417
|
+
url: './path/to/tiny-image.png'
|
|
414
418
|
}
|
|
415
419
|
})
|
|
416
420
|
```
|
|
@@ -867,7 +871,7 @@ sock.sendMessage(jid, {
|
|
|
867
871
|
audio: {
|
|
868
872
|
url: './path/to/audio.mp3'
|
|
869
873
|
},
|
|
870
|
-
ptt: false
|
|
874
|
+
ptt: false // --- Set true if you want to send audio as Voice Note
|
|
871
875
|
}, {
|
|
872
876
|
quoted: message
|
|
873
877
|
})
|
|
@@ -1142,6 +1146,25 @@ sock.sendMessage(jid, {
|
|
|
1142
1146
|
}, {
|
|
1143
1147
|
quoted: message
|
|
1144
1148
|
})
|
|
1149
|
+
|
|
1150
|
+
// --- Native Flow with Audio in the Footer
|
|
1151
|
+
sock.sendMessage(jid, {
|
|
1152
|
+
text: '🔈 Music in the footer!',
|
|
1153
|
+
audioFooter: {
|
|
1154
|
+
url: './path/to/audio.mp3'
|
|
1155
|
+
}, // --- Like other media upload methods, buffers and streams are supported
|
|
1156
|
+
nativeFlow: [{
|
|
1157
|
+
text: '👍🏻 Good, next',
|
|
1158
|
+
id: '#Next',
|
|
1159
|
+
icon: 'review'
|
|
1160
|
+
}, {
|
|
1161
|
+
text: '👎🏻 Skip',
|
|
1162
|
+
id: '#Skip',
|
|
1163
|
+
icon: 'default'
|
|
1164
|
+
}]
|
|
1165
|
+
}, {
|
|
1166
|
+
quoted: message
|
|
1167
|
+
})
|
|
1145
1168
|
```
|
|
1146
1169
|
|
|
1147
1170
|
#### 4️⃣ Hydrated Template
|
|
@@ -1358,6 +1381,21 @@ sock.sendMessage(jid, {
|
|
|
1358
1381
|
})
|
|
1359
1382
|
```
|
|
1360
1383
|
|
|
1384
|
+
#### 🔟 Spoiler
|
|
1385
|
+
|
|
1386
|
+
> [!NOTE]
|
|
1387
|
+
> Wrap message into `spoilerMessage`
|
|
1388
|
+
|
|
1389
|
+
```javascript
|
|
1390
|
+
sock.sendMessage(jid, {
|
|
1391
|
+
image: {
|
|
1392
|
+
url: './path/to/image.jpg'
|
|
1393
|
+
},
|
|
1394
|
+
caption: '❔ Spoiler',
|
|
1395
|
+
spoiler: true
|
|
1396
|
+
})
|
|
1397
|
+
```
|
|
1398
|
+
|
|
1361
1399
|
### ♻️ Modify Messages
|
|
1362
1400
|
|
|
1363
1401
|
#### 🗑️ Delete Messages
|
|
@@ -1414,7 +1452,7 @@ console.log('🏷️ Got user ID', ':', ids)
|
|
|
1414
1452
|
// --- Output when failed
|
|
1415
1453
|
// {
|
|
1416
1454
|
// phoneNumber: '6281111111111@s.whatsapp.net',
|
|
1417
|
-
// lid:
|
|
1455
|
+
// lid: undefined
|
|
1418
1456
|
// }
|
|
1419
1457
|
// --- Same output shape regardless of input type
|
|
1420
1458
|
```
|
|
@@ -1564,7 +1602,9 @@ const metadata = await sock.groupMetadata(jid)
|
|
|
1564
1602
|
console.dir(metadata, { depth: null })
|
|
1565
1603
|
|
|
1566
1604
|
// --- Get group invite code
|
|
1567
|
-
sock.groupInviteCode(jid)
|
|
1605
|
+
const inviteCode = await sock.groupInviteCode(jid)
|
|
1606
|
+
console.dir(inviteCode, { depth: null })
|
|
1607
|
+
|
|
1568
1608
|
|
|
1569
1609
|
// --- Revoke invite link
|
|
1570
1610
|
sock.groupRevokeInvite(jid)
|
|
@@ -1641,13 +1681,100 @@ const requests = await sock.groupRequestParticipantsList(jid)
|
|
|
1641
1681
|
console.dir(requests, { depth: null })
|
|
1642
1682
|
|
|
1643
1683
|
// --- Get group info from link
|
|
1644
|
-
const group = await sock.groupGetInviteInfo('
|
|
1645
|
-
console.log('👥 Got group info from
|
|
1684
|
+
const group = await sock.groupGetInviteInfo('ABC123456789')
|
|
1685
|
+
console.log('👥 Got group info from invite code', ':', group)
|
|
1646
1686
|
|
|
1647
1687
|
// --- Update bot member label
|
|
1648
1688
|
sock.updateMemberLabel(jid, '@itsliaaa/baileys')
|
|
1649
1689
|
```
|
|
1650
1690
|
|
|
1691
|
+
#### 👥 Community Management
|
|
1692
|
+
|
|
1693
|
+
```javascript
|
|
1694
|
+
// --- Create a new one and add description
|
|
1695
|
+
const community = await sock.communityCreate('@itsliaaa/baileys', '📣 Fresh updates weekly')
|
|
1696
|
+
console.dir(community, { depth: null })
|
|
1697
|
+
|
|
1698
|
+
// --- Create a subgroup for community and add participants using their JIDs
|
|
1699
|
+
const group = await sock.communityCreateGroup('📢 Announcements', ['628123456789@s.whatsapp.net'], communityJid)
|
|
1700
|
+
|
|
1701
|
+
// --- Link an existing group
|
|
1702
|
+
sock.communityLinkGroup(groupJid, communityJid)
|
|
1703
|
+
|
|
1704
|
+
// --- Unlink an existing group
|
|
1705
|
+
sock.communityUnlinkGroup(groupJid, communityJid)
|
|
1706
|
+
|
|
1707
|
+
// --- Get info
|
|
1708
|
+
const metadata = await sock.communityMetadata(jid)
|
|
1709
|
+
console.dir(metadata, { depth: null })
|
|
1710
|
+
|
|
1711
|
+
// --- Get community invite code
|
|
1712
|
+
const inviteCode = await sock.communityInviteCode(jid)
|
|
1713
|
+
console.dir(inviteCode, { depth: null })
|
|
1714
|
+
|
|
1715
|
+
// --- Revoke invite link
|
|
1716
|
+
sock.communityRevokeInvite(jid)
|
|
1717
|
+
|
|
1718
|
+
// --- Accept community invite
|
|
1719
|
+
sock.communityAcceptInvite(inviteCode)
|
|
1720
|
+
|
|
1721
|
+
// --- Leave community
|
|
1722
|
+
sock.communityLeave(jid)
|
|
1723
|
+
|
|
1724
|
+
// --- Accept join requests
|
|
1725
|
+
sock.communityRequestParticipantsUpdate(jid, ['628123456789@s.whatsapp.net'], 'approve')
|
|
1726
|
+
|
|
1727
|
+
// --- Change name
|
|
1728
|
+
sock.communityUpdateSubject(jid, '📦 @itsliaaa/baileys')
|
|
1729
|
+
|
|
1730
|
+
// --- Change description
|
|
1731
|
+
sock.communityUpdateDescription(jid, 'Updated description')
|
|
1732
|
+
|
|
1733
|
+
// --- Set community as admin only for chatting
|
|
1734
|
+
sock.communitySettingUpdate(jid, 'announcement')
|
|
1735
|
+
|
|
1736
|
+
// --- Set community as open to all for chatting
|
|
1737
|
+
sock.communitySettingUpdate(jid, 'not_announcement')
|
|
1738
|
+
|
|
1739
|
+
// --- Set admin only can edit community info
|
|
1740
|
+
sock.communitySettingUpdate(jid, 'locked')
|
|
1741
|
+
|
|
1742
|
+
// --- Set all participants can edit community info
|
|
1743
|
+
sock.communitySettingUpdate(jid, 'unlocked')
|
|
1744
|
+
|
|
1745
|
+
// --- Set admin only can add participants
|
|
1746
|
+
sock.communityMemberAddMode(jid, 'admin_add')
|
|
1747
|
+
|
|
1748
|
+
// --- Set all participants can add participants
|
|
1749
|
+
sock.communityMemberAddMode(jid, 'all_member_add')
|
|
1750
|
+
|
|
1751
|
+
// --- Enable or disable temporary messages with seconds format
|
|
1752
|
+
sock.communityToggleEphemeral(jid, 86400)
|
|
1753
|
+
|
|
1754
|
+
// --- Disable temporary messages
|
|
1755
|
+
sock.communityToggleEphemeral(jid, 0)
|
|
1756
|
+
|
|
1757
|
+
// --- Enable or disable membership approval mode
|
|
1758
|
+
sock.communityJoinApprovalMode(jid, 'on')
|
|
1759
|
+
sock.communityJoinApprovalMode(jid, 'off')
|
|
1760
|
+
|
|
1761
|
+
// --- Get all communities metadata
|
|
1762
|
+
const communities = await sock.communityFetchAllParticipating()
|
|
1763
|
+
console.dir(communities, { depth: null })
|
|
1764
|
+
|
|
1765
|
+
// --- Get all community linked groups
|
|
1766
|
+
const linked = await sock.communityFetchLinkedGroups(jid)
|
|
1767
|
+
console.dir(linked, { depth: null })
|
|
1768
|
+
|
|
1769
|
+
// --- Get pending join requests
|
|
1770
|
+
const requests = await sock.communityRequestParticipantsList(jid)
|
|
1771
|
+
console.dir(requests, { depth: null })
|
|
1772
|
+
|
|
1773
|
+
// --- Get community info from link
|
|
1774
|
+
const community = await sock.communityGetInviteInfo('ABC123456789')
|
|
1775
|
+
console.log('👥 Got community info from invite code', ':', community)
|
|
1776
|
+
```
|
|
1777
|
+
|
|
1651
1778
|
#### 👤 Profile Management
|
|
1652
1779
|
|
|
1653
1780
|
```javascript
|
|
@@ -1713,6 +1840,85 @@ const profile = await sock.getBusinessProfile(jid)
|
|
|
1713
1840
|
console.dir(profile, { depth: null })
|
|
1714
1841
|
```
|
|
1715
1842
|
|
|
1843
|
+
#### 🛒 Business Management
|
|
1844
|
+
|
|
1845
|
+
```javascript
|
|
1846
|
+
// --- Create a new product
|
|
1847
|
+
const product = await sock.productCreate({
|
|
1848
|
+
name: '🧩 Starseed (Premium)',
|
|
1849
|
+
description: 'Get a full version of Starseed!',
|
|
1850
|
+
price: 100000,
|
|
1851
|
+
currency: 'IDR',
|
|
1852
|
+
originCountryCode: 'ID',
|
|
1853
|
+
images: [
|
|
1854
|
+
bufferImage,
|
|
1855
|
+
{
|
|
1856
|
+
url: './path/to/image.jpg'
|
|
1857
|
+
}
|
|
1858
|
+
]
|
|
1859
|
+
})
|
|
1860
|
+
console.dir(product, { depth: null })
|
|
1861
|
+
|
|
1862
|
+
// --- Update product
|
|
1863
|
+
await sock.productUpdate(productId, {
|
|
1864
|
+
name: '🧩 Starseed (Premium)',
|
|
1865
|
+
description: 'Get a full version of Starseed with more features!',
|
|
1866
|
+
price: 75000,
|
|
1867
|
+
currency: 'IDR',
|
|
1868
|
+
images: [
|
|
1869
|
+
{
|
|
1870
|
+
url: './path/to/image.jpg'
|
|
1871
|
+
}
|
|
1872
|
+
]
|
|
1873
|
+
})
|
|
1874
|
+
|
|
1875
|
+
// --- Delete product
|
|
1876
|
+
sock.productDelete([productId])
|
|
1877
|
+
|
|
1878
|
+
// --- Get catalog info
|
|
1879
|
+
const { products, nextPageCursor } = await sock.getCatalog({
|
|
1880
|
+
jid: '628123456789@s.whatsapp.net',
|
|
1881
|
+
limit: 10
|
|
1882
|
+
})
|
|
1883
|
+
|
|
1884
|
+
// --- Get collections
|
|
1885
|
+
const collections = await sock.getCollections('628123456789@s.whatsapp.net', 10)
|
|
1886
|
+
console.dir(collections, { depth: null })
|
|
1887
|
+
|
|
1888
|
+
// --- Get order info
|
|
1889
|
+
const order = await sock.getOrderDetails(orderId, tokenBase64)
|
|
1890
|
+
console.dir(order, { depth: null })
|
|
1891
|
+
|
|
1892
|
+
// --- Update business profile
|
|
1893
|
+
await sock.updateBusinessProfile({
|
|
1894
|
+
address: 'Jakarta, Indonesia',
|
|
1895
|
+
description: '🛒 Official Starseed Store',
|
|
1896
|
+
websites: ['https://www.npmjs.com/package/@itsliaaa/baileys'],
|
|
1897
|
+
email: 'more-more@gmail.com',
|
|
1898
|
+
hours: {
|
|
1899
|
+
timezone: 'Asia/Jakarta',
|
|
1900
|
+
days: [{ day: 'mon', mode: 'open_24h' }]
|
|
1901
|
+
}
|
|
1902
|
+
})
|
|
1903
|
+
|
|
1904
|
+
// --- Update cover
|
|
1905
|
+
sock.updateCoverPhoto({
|
|
1906
|
+
url: './path/to/image.jpg'
|
|
1907
|
+
})
|
|
1908
|
+
|
|
1909
|
+
// --- Remove cover
|
|
1910
|
+
sock.removeCoverPhoto(coverId)
|
|
1911
|
+
|
|
1912
|
+
// --- Update quick replies
|
|
1913
|
+
sock.addOrEditQuickReply({
|
|
1914
|
+
shortcut: 'hello',
|
|
1915
|
+
message: 'Hello from business account',
|
|
1916
|
+
})
|
|
1917
|
+
|
|
1918
|
+
// --- Remove quick reply
|
|
1919
|
+
sock.removeQuickReply(timestamp)
|
|
1920
|
+
```
|
|
1921
|
+
|
|
1716
1922
|
#### 🔐 Privacy Management
|
|
1717
1923
|
|
|
1718
1924
|
```javascript
|
package/WAProto/index.d.ts
CHANGED
|
@@ -4056,6 +4056,10 @@ export namespace proto {
|
|
|
4056
4056
|
isSenderNewAccount?: (boolean|null);
|
|
4057
4057
|
afterReadDuration?: (number|null);
|
|
4058
4058
|
isSenderSuspicious?: (boolean|null);
|
|
4059
|
+
appealStatus?: (proto.Conversation.GroupAppealStatus|null);
|
|
4060
|
+
appealUpdateTime?: (number|Long|null);
|
|
4061
|
+
authAgentParentCompanyName?: (string|null);
|
|
4062
|
+
authAgentObaPhoneNumber?: (string|null);
|
|
4059
4063
|
}
|
|
4060
4064
|
|
|
4061
4065
|
class Conversation implements IConversation {
|
|
@@ -4118,6 +4122,10 @@ export namespace proto {
|
|
|
4118
4122
|
public isSenderNewAccount?: (boolean|null);
|
|
4119
4123
|
public afterReadDuration?: (number|null);
|
|
4120
4124
|
public isSenderSuspicious?: (boolean|null);
|
|
4125
|
+
public appealStatus?: (proto.Conversation.GroupAppealStatus|null);
|
|
4126
|
+
public appealUpdateTime?: (number|Long|null);
|
|
4127
|
+
public authAgentParentCompanyName?: (string|null);
|
|
4128
|
+
public authAgentObaPhoneNumber?: (string|null);
|
|
4121
4129
|
public static create(properties?: proto.IConversation): proto.Conversation;
|
|
4122
4130
|
public static encode(m: proto.IConversation, w?: $protobuf.Writer): $protobuf.Writer;
|
|
4123
4131
|
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.Conversation;
|
|
@@ -4135,6 +4143,13 @@ export namespace proto {
|
|
|
4135
4143
|
COMPLETE_ON_DEMAND_SYNC_BUT_MORE_MSG_REMAIN_ON_PRIMARY = 2,
|
|
4136
4144
|
COMPLETE_ON_DEMAND_SYNC_WITH_MORE_MSG_ON_PRIMARY_BUT_NO_ACCESS = 3
|
|
4137
4145
|
}
|
|
4146
|
+
|
|
4147
|
+
enum GroupAppealStatus {
|
|
4148
|
+
NO_APPEAL = 0,
|
|
4149
|
+
APPEAL_IN_REVIEW = 1,
|
|
4150
|
+
APPEAL_APPROVED = 2,
|
|
4151
|
+
APPEAL_REJECTED = 3
|
|
4152
|
+
}
|
|
4138
4153
|
}
|
|
4139
4154
|
|
|
4140
4155
|
interface IDeviceCapabilities {
|
package/WAProto/index.js
CHANGED
|
@@ -27788,6 +27788,10 @@ export const proto = $root.proto = (() => {
|
|
|
27788
27788
|
Conversation.prototype.isSenderNewAccount = null;
|
|
27789
27789
|
Conversation.prototype.afterReadDuration = null;
|
|
27790
27790
|
Conversation.prototype.isSenderSuspicious = null;
|
|
27791
|
+
Conversation.prototype.appealStatus = null;
|
|
27792
|
+
Conversation.prototype.appealUpdateTime = null;
|
|
27793
|
+
Conversation.prototype.authAgentParentCompanyName = null;
|
|
27794
|
+
Conversation.prototype.authAgentObaPhoneNumber = null;
|
|
27791
27795
|
|
|
27792
27796
|
let $oneOfFields;
|
|
27793
27797
|
|
|
@@ -28121,6 +28125,30 @@ export const proto = $root.proto = (() => {
|
|
|
28121
28125
|
set: $util.oneOfSetter($oneOfFields)
|
|
28122
28126
|
});
|
|
28123
28127
|
|
|
28128
|
+
// Virtual OneOf for proto3 optional field
|
|
28129
|
+
Object.defineProperty(Conversation.prototype, "_appealStatus", {
|
|
28130
|
+
get: $util.oneOfGetter($oneOfFields = ["appealStatus"]),
|
|
28131
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
28132
|
+
});
|
|
28133
|
+
|
|
28134
|
+
// Virtual OneOf for proto3 optional field
|
|
28135
|
+
Object.defineProperty(Conversation.prototype, "_appealUpdateTime", {
|
|
28136
|
+
get: $util.oneOfGetter($oneOfFields = ["appealUpdateTime"]),
|
|
28137
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
28138
|
+
});
|
|
28139
|
+
|
|
28140
|
+
// Virtual OneOf for proto3 optional field
|
|
28141
|
+
Object.defineProperty(Conversation.prototype, "_authAgentParentCompanyName", {
|
|
28142
|
+
get: $util.oneOfGetter($oneOfFields = ["authAgentParentCompanyName"]),
|
|
28143
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
28144
|
+
});
|
|
28145
|
+
|
|
28146
|
+
// Virtual OneOf for proto3 optional field
|
|
28147
|
+
Object.defineProperty(Conversation.prototype, "_authAgentObaPhoneNumber", {
|
|
28148
|
+
get: $util.oneOfGetter($oneOfFields = ["authAgentObaPhoneNumber"]),
|
|
28149
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
28150
|
+
});
|
|
28151
|
+
|
|
28124
28152
|
Conversation.create = function create(properties) {
|
|
28125
28153
|
return new Conversation(properties);
|
|
28126
28154
|
};
|
|
@@ -28248,6 +28276,14 @@ export const proto = $root.proto = (() => {
|
|
|
28248
28276
|
w.uint32(456).uint32(m.afterReadDuration);
|
|
28249
28277
|
if (m.isSenderSuspicious != null && Object.hasOwnProperty.call(m, "isSenderSuspicious"))
|
|
28250
28278
|
w.uint32(464).bool(m.isSenderSuspicious);
|
|
28279
|
+
if (m.appealStatus != null && Object.hasOwnProperty.call(m, "appealStatus"))
|
|
28280
|
+
w.uint32(472).int32(m.appealStatus);
|
|
28281
|
+
if (m.appealUpdateTime != null && Object.hasOwnProperty.call(m, "appealUpdateTime"))
|
|
28282
|
+
w.uint32(480).uint64(m.appealUpdateTime);
|
|
28283
|
+
if (m.authAgentParentCompanyName != null && Object.hasOwnProperty.call(m, "authAgentParentCompanyName"))
|
|
28284
|
+
w.uint32(490).string(m.authAgentParentCompanyName);
|
|
28285
|
+
if (m.authAgentObaPhoneNumber != null && Object.hasOwnProperty.call(m, "authAgentObaPhoneNumber"))
|
|
28286
|
+
w.uint32(498).string(m.authAgentObaPhoneNumber);
|
|
28251
28287
|
return w;
|
|
28252
28288
|
};
|
|
28253
28289
|
|
|
@@ -28500,6 +28536,22 @@ export const proto = $root.proto = (() => {
|
|
|
28500
28536
|
m.isSenderSuspicious = r.bool();
|
|
28501
28537
|
break;
|
|
28502
28538
|
}
|
|
28539
|
+
case 59: {
|
|
28540
|
+
m.appealStatus = r.int32();
|
|
28541
|
+
break;
|
|
28542
|
+
}
|
|
28543
|
+
case 60: {
|
|
28544
|
+
m.appealUpdateTime = r.uint64();
|
|
28545
|
+
break;
|
|
28546
|
+
}
|
|
28547
|
+
case 61: {
|
|
28548
|
+
m.authAgentParentCompanyName = r.string();
|
|
28549
|
+
break;
|
|
28550
|
+
}
|
|
28551
|
+
case 62: {
|
|
28552
|
+
m.authAgentObaPhoneNumber = r.string();
|
|
28553
|
+
break;
|
|
28554
|
+
}
|
|
28503
28555
|
default:
|
|
28504
28556
|
r.skipType(t & 7, n);
|
|
28505
28557
|
break;
|
|
@@ -28846,6 +28898,46 @@ export const proto = $root.proto = (() => {
|
|
|
28846
28898
|
if (d.isSenderSuspicious != null) {
|
|
28847
28899
|
m.isSenderSuspicious = Boolean(d.isSenderSuspicious);
|
|
28848
28900
|
}
|
|
28901
|
+
switch (d.appealStatus) {
|
|
28902
|
+
default:
|
|
28903
|
+
if (typeof d.appealStatus === "number") {
|
|
28904
|
+
m.appealStatus = d.appealStatus;
|
|
28905
|
+
break;
|
|
28906
|
+
}
|
|
28907
|
+
break;
|
|
28908
|
+
case "NO_APPEAL":
|
|
28909
|
+
case 0:
|
|
28910
|
+
m.appealStatus = 0;
|
|
28911
|
+
break;
|
|
28912
|
+
case "APPEAL_IN_REVIEW":
|
|
28913
|
+
case 1:
|
|
28914
|
+
m.appealStatus = 1;
|
|
28915
|
+
break;
|
|
28916
|
+
case "APPEAL_APPROVED":
|
|
28917
|
+
case 2:
|
|
28918
|
+
m.appealStatus = 2;
|
|
28919
|
+
break;
|
|
28920
|
+
case "APPEAL_REJECTED":
|
|
28921
|
+
case 3:
|
|
28922
|
+
m.appealStatus = 3;
|
|
28923
|
+
break;
|
|
28924
|
+
}
|
|
28925
|
+
if (d.appealUpdateTime != null) {
|
|
28926
|
+
if ($util.Long)
|
|
28927
|
+
(m.appealUpdateTime = $util.Long.fromValue(d.appealUpdateTime)).unsigned = true;
|
|
28928
|
+
else if (typeof d.appealUpdateTime === "string")
|
|
28929
|
+
m.appealUpdateTime = parseInt(d.appealUpdateTime, 10);
|
|
28930
|
+
else if (typeof d.appealUpdateTime === "number")
|
|
28931
|
+
m.appealUpdateTime = d.appealUpdateTime;
|
|
28932
|
+
else if (typeof d.appealUpdateTime === "object")
|
|
28933
|
+
m.appealUpdateTime = new $util.LongBits(d.appealUpdateTime.low >>> 0, d.appealUpdateTime.high >>> 0).toNumber(true);
|
|
28934
|
+
}
|
|
28935
|
+
if (d.authAgentParentCompanyName != null) {
|
|
28936
|
+
m.authAgentParentCompanyName = String(d.authAgentParentCompanyName);
|
|
28937
|
+
}
|
|
28938
|
+
if (d.authAgentObaPhoneNumber != null) {
|
|
28939
|
+
m.authAgentObaPhoneNumber = String(d.authAgentObaPhoneNumber);
|
|
28940
|
+
}
|
|
28849
28941
|
return m;
|
|
28850
28942
|
};
|
|
28851
28943
|
|
|
@@ -29174,6 +29266,29 @@ export const proto = $root.proto = (() => {
|
|
|
29174
29266
|
if (o.oneofs)
|
|
29175
29267
|
d._isSenderSuspicious = "isSenderSuspicious";
|
|
29176
29268
|
}
|
|
29269
|
+
if (m.appealStatus != null && m.hasOwnProperty("appealStatus")) {
|
|
29270
|
+
d.appealStatus = o.enums === String ? $root.proto.Conversation.GroupAppealStatus[m.appealStatus] === undefined ? m.appealStatus : $root.proto.Conversation.GroupAppealStatus[m.appealStatus] : m.appealStatus;
|
|
29271
|
+
if (o.oneofs)
|
|
29272
|
+
d._appealStatus = "appealStatus";
|
|
29273
|
+
}
|
|
29274
|
+
if (m.appealUpdateTime != null && m.hasOwnProperty("appealUpdateTime")) {
|
|
29275
|
+
if (typeof m.appealUpdateTime === "number")
|
|
29276
|
+
d.appealUpdateTime = o.longs === String ? String(m.appealUpdateTime) : m.appealUpdateTime;
|
|
29277
|
+
else
|
|
29278
|
+
d.appealUpdateTime = o.longs === String ? longToString(m.appealUpdateTime, true) : o.longs === Number ? longToNumber(m.appealUpdateTime, true) : m.appealUpdateTime;
|
|
29279
|
+
if (o.oneofs)
|
|
29280
|
+
d._appealUpdateTime = "appealUpdateTime";
|
|
29281
|
+
}
|
|
29282
|
+
if (m.authAgentParentCompanyName != null && m.hasOwnProperty("authAgentParentCompanyName")) {
|
|
29283
|
+
d.authAgentParentCompanyName = m.authAgentParentCompanyName;
|
|
29284
|
+
if (o.oneofs)
|
|
29285
|
+
d._authAgentParentCompanyName = "authAgentParentCompanyName";
|
|
29286
|
+
}
|
|
29287
|
+
if (m.authAgentObaPhoneNumber != null && m.hasOwnProperty("authAgentObaPhoneNumber")) {
|
|
29288
|
+
d.authAgentObaPhoneNumber = m.authAgentObaPhoneNumber;
|
|
29289
|
+
if (o.oneofs)
|
|
29290
|
+
d._authAgentObaPhoneNumber = "authAgentObaPhoneNumber";
|
|
29291
|
+
}
|
|
29177
29292
|
return d;
|
|
29178
29293
|
};
|
|
29179
29294
|
|
|
@@ -29197,6 +29312,15 @@ export const proto = $root.proto = (() => {
|
|
|
29197
29312
|
return values;
|
|
29198
29313
|
})();
|
|
29199
29314
|
|
|
29315
|
+
Conversation.GroupAppealStatus = (function() {
|
|
29316
|
+
const valuesById = {}, values = Object.create(valuesById);
|
|
29317
|
+
values[valuesById[0] = "NO_APPEAL"] = 0;
|
|
29318
|
+
values[valuesById[1] = "APPEAL_IN_REVIEW"] = 1;
|
|
29319
|
+
values[valuesById[2] = "APPEAL_APPROVED"] = 2;
|
|
29320
|
+
values[valuesById[3] = "APPEAL_REJECTED"] = 3;
|
|
29321
|
+
return values;
|
|
29322
|
+
})();
|
|
29323
|
+
|
|
29200
29324
|
return Conversation;
|
|
29201
29325
|
})();
|
|
29202
29326
|
|
package/lib/Defaults/index.d.ts
CHANGED
|
@@ -30,6 +30,12 @@ export namespace WA_CERT_DETAILS {
|
|
|
30
30
|
let PUBLIC_KEY: any;
|
|
31
31
|
}
|
|
32
32
|
export const PROCESSABLE_HISTORY_TYPES: proto.HistorySync.HistorySyncType[];
|
|
33
|
+
export namespace DEFAULT_CACHE_TTLS {
|
|
34
|
+
let SIGNAL_STORE: number;
|
|
35
|
+
let MSG_RETRY: number;
|
|
36
|
+
let CALL_OFFER: number;
|
|
37
|
+
let USER_DEVICES: number;
|
|
38
|
+
}
|
|
33
39
|
export namespace DEFAULT_CONNECTION_CONFIG {
|
|
34
40
|
export { version };
|
|
35
41
|
export let browser: any[];
|
|
@@ -120,13 +126,6 @@ export const HISTORY_SYNC_PAUSED_TIMEOUT_MS: 120000;
|
|
|
120
126
|
export const MIN_PREKEY_COUNT: 5;
|
|
121
127
|
export const INITIAL_PREKEY_COUNT: 812;
|
|
122
128
|
export const UPLOAD_TIMEOUT: 30000;
|
|
123
|
-
export const MIN_UPLOAD_INTERVAL: 5000;
|
|
124
|
-
export namespace DEFAULT_CACHE_TTLS {
|
|
125
|
-
let SIGNAL_STORE: number;
|
|
126
|
-
let MSG_RETRY: number;
|
|
127
|
-
let CALL_OFFER: number;
|
|
128
|
-
let USER_DEVICES: number;
|
|
129
|
-
}
|
|
130
129
|
export namespace TimeMs {
|
|
131
130
|
let Minute: number;
|
|
132
131
|
let Hour: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Defaults/index.js"],"names":[],"mappings":"AAKA,0CAAkD;AAClD,sCAAuC,mMAAiL,CAAC;AACzN,6BAA8B,0BAA0B,CAAC;AACzD,gCAAiC,kCAAkC,CAAC;AACpE,gCAAiC,kCAAkC,CAAC;AACpE,yBAA0B,6BAA6B,CAAC;AACxD,2BAA4B,kBAAkB,CAAC;AAC/C,kCAAmC,KAAK,CAAC;AACzC,6BAA8B,MAAM,CAAC;AACrC,kCAAmC,SAAS,CAAC;AAC7C,4CAA6D;AAC7D,2CAA4D;AAC5D,mDAAoE;AACpE,kDAAmE;AACnE,0CAAqD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,wBAAwB"}
|
package/lib/Defaults/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { proto } from '../../WAProto/index.js';
|
|
|
2
2
|
import { makeLibSignalRepository } from '../Signal/libsignal.js';
|
|
3
3
|
import { Browsers } from '../Utils/browser-utils.js';
|
|
4
4
|
import logger from '../Utils/logger.js';
|
|
5
|
-
const version = [2, 3000,
|
|
5
|
+
const version = [2, 3000, 1038839325];
|
|
6
6
|
export const UNAUTHORIZED_CODES = [401, 403, 419];
|
|
7
7
|
export const BIZ_BOT_SUPPORT_PAYLOAD = '{"version":1,"is_ai_message":true,"should_upload_client_logs":false,"should_show_system_message":false,"ticket_id":"7004947587700716","citation_items":[],"ticket_locale":"us"}';
|
|
8
8
|
export const DEFAULT_ORIGIN = 'https://web.whatsapp.com';
|
|
@@ -43,6 +43,12 @@ export const PROCESSABLE_HISTORY_TYPES = [
|
|
|
43
43
|
proto.HistorySync.HistorySyncType.NON_BLOCKING_DATA,
|
|
44
44
|
proto.HistorySync.HistorySyncType.INITIAL_STATUS_V3
|
|
45
45
|
];
|
|
46
|
+
export const DEFAULT_CACHE_TTLS = {
|
|
47
|
+
SIGNAL_STORE: 5 * 60, // 5 minutes
|
|
48
|
+
MSG_RETRY: 60 * 60, // 1 hour
|
|
49
|
+
CALL_OFFER: 5 * 60, // 5 minutes
|
|
50
|
+
USER_DEVICES: 5 * 60 // 5 minutes
|
|
51
|
+
};
|
|
46
52
|
export const DEFAULT_CONNECTION_CONFIG = {
|
|
47
53
|
version: version,
|
|
48
54
|
browser: Browsers.macOS('Chrome'),
|
|
@@ -131,13 +137,6 @@ export const HISTORY_SYNC_PAUSED_TIMEOUT_MS = 120000;
|
|
|
131
137
|
export const MIN_PREKEY_COUNT = 5;
|
|
132
138
|
export const INITIAL_PREKEY_COUNT = 812;
|
|
133
139
|
export const UPLOAD_TIMEOUT = 30000; // 30 seconds
|
|
134
|
-
export const MIN_UPLOAD_INTERVAL = 5000; // 5 seconds minimum between uploads
|
|
135
|
-
export const DEFAULT_CACHE_TTLS = {
|
|
136
|
-
SIGNAL_STORE: 5 * 60, // 5 minutes
|
|
137
|
-
MSG_RETRY: 60 * 60, // 1 hour
|
|
138
|
-
CALL_OFFER: 5 * 60, // 5 minutes
|
|
139
|
-
USER_DEVICES: 5 * 60 // 5 minutes
|
|
140
|
-
};
|
|
141
140
|
export const TimeMs = {
|
|
142
141
|
Minute: 60 * 1000,
|
|
143
142
|
Hour: 60 * 60 * 1000,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Defaults/index.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,MAAM,OAAO,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;AACtC,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAClD,MAAM,CAAC,MAAM,uBAAuB,GAAG,iLAAiL,CAAC;AACzN,MAAM,CAAC,MAAM,cAAc,GAAG,0BAA0B,CAAC;AACzD,MAAM,CAAC,MAAM,iBAAiB,GAAG,kCAAkC,CAAC;AACpE,MAAM,CAAC,MAAM,iBAAiB,GAAG,kCAAkC,CAAC;AACpE,MAAM,CAAC,MAAM,UAAU,GAAG,6BAA6B,CAAC,CAAC,wEAAwE;AACjI,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAC/C,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,CAAC;AACzC,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC;AACrC,MAAM,CAAC,MAAM,mBAAmB,GAAG,SAAS,CAAC;AAC7C,MAAM,CAA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GAAG,GAAG,CAAC;AACxC,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC,CAAC,aAAa;AAClD,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,MAAM,EAAE,EAAE,GAAG,IAAI;IACjB,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI;IACpB,GAAG,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;IACxB,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;CAChC,CAAC;AACF,MAAM,CAAC,MAAM,6BAA6B,GAAG;IACzC,iBAAiB,EAAE,kEAAkE;IACrF,YAAY,EAAE,IAAI;CACrB,CAAC"}
|
|
@@ -22,6 +22,18 @@ export function makeLibSignalRepository(auth: any, logger: any, pnToLIDFunc: any
|
|
|
22
22
|
meId: any;
|
|
23
23
|
data: any;
|
|
24
24
|
}): Promise<any>;
|
|
25
|
+
getSenderKeyDistributionMessage({ group, meId }: {
|
|
26
|
+
group: any;
|
|
27
|
+
meId: any;
|
|
28
|
+
}): Promise<any>;
|
|
29
|
+
hasSenderKey({ group, meId }: {
|
|
30
|
+
group: any;
|
|
31
|
+
meId: any;
|
|
32
|
+
}): Promise<boolean>;
|
|
33
|
+
getSessionInfo(jid: any): Promise<{
|
|
34
|
+
baseKey: Uint8Array<any>;
|
|
35
|
+
registrationId: number;
|
|
36
|
+
} | null>;
|
|
25
37
|
injectE2ESession({ jid, session }: {
|
|
26
38
|
jid: any;
|
|
27
39
|
session: any;
|
|
@@ -36,6 +48,7 @@ export function makeLibSignalRepository(auth: any, logger: any, pnToLIDFunc: any
|
|
|
36
48
|
reason?: undefined;
|
|
37
49
|
}>;
|
|
38
50
|
deleteSession(jids: any): Promise<any>;
|
|
51
|
+
close(): void;
|
|
39
52
|
migrateSession(fromJid: any, toJid: any): Promise<any>;
|
|
40
53
|
};
|
|
41
54
|
import { LIDMappingStore } from './lid-mapping.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libsignal.d.ts","sourceRoot":"","sources":["../../src/Signal/libsignal.js"],"names":[],"mappings":"AAiCA
|
|
1
|
+
{"version":3,"file":"libsignal.d.ts","sourceRoot":"","sources":["../../src/Signal/libsignal.js"],"names":[],"mappings":"AAiCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoRC;gCA3S+B,kBAAkB"}
|