@fer2809fl/baileys 7.0.1 → 7.0.4
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 +322 -578
- package/WAProto/WAProto.proto +916 -360
- package/WAProto/fix-imports.js +18 -22
- package/WAProto/index.d.ts +15471 -8638
- package/WAProto/index.js +80576 -45941
- package/lib/Defaults/index.d.ts +14 -18
- package/lib/Defaults/index.js +111 -115
- package/lib/Signal/libsignal.js +22 -31
- package/lib/Signal/lid-mapping.d.ts +0 -4
- package/lib/Signal/lid-mapping.js +0 -6
- package/lib/Socket/business.d.ts +8 -75
- package/lib/Socket/business.js +1 -0
- package/lib/Socket/chats.d.ts +0 -6
- package/lib/Socket/chats.js +3 -67
- package/lib/Socket/communities.d.ts +641 -336
- package/lib/Socket/communities.js +3 -6
- package/lib/Socket/dugong.d.ts +130 -0
- package/lib/Socket/dugong.js +772 -0
- package/lib/Socket/groups.d.ts +18 -23
- package/lib/Socket/groups.js +88 -168
- package/lib/Socket/index.d.ts +631 -322
- package/lib/Socket/index.js +12 -9
- package/lib/Socket/messages-recv.d.ts +52 -84
- package/lib/Socket/messages-recv.js +193 -677
- package/lib/Socket/messages-send.d.ts +643 -262
- package/lib/Socket/messages-send.js +1559 -1359
- package/lib/Socket/mex.d.ts +0 -1
- package/lib/Socket/mex.js +8 -22
- package/lib/Socket/native-buttons.js +231 -0
- package/lib/Socket/newsletter.d.ts +27 -42
- package/lib/Socket/newsletter.js +439 -402
- package/lib/Socket/socket.d.ts +2 -6
- package/lib/Socket/socket.js +47 -39
- package/lib/Types/Auth.d.ts +0 -1
- package/lib/Types/Bussines.d.ts +34 -22
- package/lib/Types/Call.d.ts +1 -1
- package/lib/Types/Chat.d.ts +0 -1
- package/lib/Types/Contact.d.ts +0 -2
- package/lib/Types/Events.d.ts +1 -20
- package/lib/Types/GroupMetadata.d.ts +1 -4
- package/lib/Types/Message.d.ts +348 -354
- package/lib/Types/Message.js +0 -4
- package/lib/Types/{Mex.d.ts → Newsletter.d.ts} +7 -17
- package/lib/Types/{Mex.js → Newsletter.js} +5 -3
- package/lib/Types/Signal.d.ts +1 -12
- package/lib/Types/Socket.d.ts +148 -135
- package/lib/Types/State.d.ts +0 -65
- package/lib/Types/State.js +0 -43
- package/lib/Types/index.d.ts +52 -52
- package/lib/Types/index.js +30 -23
- package/lib/Utils/auth-utils.d.ts +0 -5
- package/lib/Utils/auth-utils.js +0 -12
- package/lib/Utils/browser-utils.js +0 -1
- package/lib/Utils/crypto.d.ts +12 -12
- package/lib/Utils/decode-wa-message.d.ts +0 -18
- package/lib/Utils/decode-wa-message.js +0 -34
- package/lib/Utils/event-buffer.d.ts +0 -2
- package/lib/Utils/generics.d.ts +2 -3
- package/lib/Utils/generics.js +1 -10
- package/lib/Utils/history.d.ts +0 -2
- package/lib/Utils/history.js +9 -12
- package/lib/Utils/identity-change-handler.d.ts +0 -7
- package/lib/Utils/identity-change-handler.js +0 -1
- package/lib/Utils/index.d.ts +23 -30
- package/lib/Utils/index.js +3 -9
- package/lib/Utils/link-preview.js +2 -2
- package/lib/Utils/message-retry-manager.d.ts +0 -5
- package/lib/Utils/message-retry-manager.js +11 -11
- package/lib/Utils/messages-media.d.ts +13 -45
- package/lib/Utils/messages-media.js +98 -293
- package/lib/Utils/messages.d.ts +3 -16
- package/lib/Utils/messages.js +1123 -1219
- package/lib/Utils/noise-handler.d.ts +1 -1
- package/lib/Utils/process-message.js +1 -103
- package/lib/Utils/rich-messages.d.ts +277 -0
- package/lib/Utils/rich-messages.js +1144 -0
- package/lib/Utils/signal.d.ts +0 -13
- package/lib/Utils/signal.js +0 -42
- package/lib/Utils/sticker-pack.d.ts +10 -0
- package/lib/Utils/sticker-pack.js +111 -0
- package/lib/Utils/sync-action-utils.js +0 -1
- package/lib/Utils/tc-token-utils.d.ts +1 -26
- package/lib/Utils/tc-token-utils.js +5 -151
- package/lib/Utils/validate-connection.d.ts +0 -1
- package/lib/Utils/validate-connection.js +3 -13
- package/lib/WABinary/decode.d.ts +1 -1
- package/lib/WABinary/generic-utils.d.ts +3 -1
- package/lib/WABinary/generic-utils.js +78 -0
- package/lib/WABinary/jid-utils.d.ts +0 -11
- package/lib/WABinary/jid-utils.js +0 -33
- package/lib/WAM/encode.d.ts +1 -1
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +3 -26
- package/lib/WAUSync/Protocols/index.d.ts +0 -1
- package/lib/WAUSync/USyncQuery.d.ts +0 -1
- package/lib/WAUSync/USyncQuery.js +1 -1
- package/lib/WAUSync/USyncUser.d.ts +0 -4
- package/lib/WAUSync/USyncUser.js +0 -8
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -4
- package/package.json +27 -31
- package/LICENSE +0 -21
- package/engine-requirements.js +0 -10
- package/lib/Defaults/index.d.ts.map +0 -1
- package/lib/Defaults/index.js.map +0 -1
- package/lib/Signal/Group/ciphertext-message.d.ts.map +0 -1
- package/lib/Signal/Group/ciphertext-message.js.map +0 -1
- package/lib/Signal/Group/group-session-builder.d.ts.map +0 -1
- package/lib/Signal/Group/group-session-builder.js.map +0 -1
- package/lib/Signal/Group/group_cipher.d.ts.map +0 -1
- package/lib/Signal/Group/group_cipher.js.map +0 -1
- package/lib/Signal/Group/index.d.ts.map +0 -1
- package/lib/Signal/Group/index.js.map +0 -1
- package/lib/Signal/Group/keyhelper.d.ts.map +0 -1
- package/lib/Signal/Group/keyhelper.js.map +0 -1
- package/lib/Signal/Group/sender-chain-key.d.ts.map +0 -1
- package/lib/Signal/Group/sender-chain-key.js.map +0 -1
- package/lib/Signal/Group/sender-key-distribution-message.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-distribution-message.js.map +0 -1
- package/lib/Signal/Group/sender-key-message.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-message.js.map +0 -1
- package/lib/Signal/Group/sender-key-name.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-name.js.map +0 -1
- package/lib/Signal/Group/sender-key-record.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-record.js.map +0 -1
- package/lib/Signal/Group/sender-key-state.d.ts.map +0 -1
- package/lib/Signal/Group/sender-key-state.js.map +0 -1
- package/lib/Signal/Group/sender-message-key.d.ts.map +0 -1
- package/lib/Signal/Group/sender-message-key.js.map +0 -1
- package/lib/Signal/libsignal.d.ts.map +0 -1
- package/lib/Signal/libsignal.js.map +0 -1
- package/lib/Signal/lid-mapping.d.ts.map +0 -1
- package/lib/Signal/lid-mapping.js.map +0 -1
- package/lib/Socket/Client/index.d.ts.map +0 -1
- package/lib/Socket/Client/index.js.map +0 -1
- package/lib/Socket/Client/types.d.ts.map +0 -1
- package/lib/Socket/Client/types.js.map +0 -1
- package/lib/Socket/Client/websocket.d.ts.map +0 -1
- package/lib/Socket/Client/websocket.js.map +0 -1
- package/lib/Socket/business.d.ts.map +0 -1
- package/lib/Socket/business.js.map +0 -1
- package/lib/Socket/chats.d.ts.map +0 -1
- package/lib/Socket/chats.js.map +0 -1
- package/lib/Socket/communities.d.ts.map +0 -1
- package/lib/Socket/communities.js.map +0 -1
- package/lib/Socket/groups.d.ts.map +0 -1
- package/lib/Socket/groups.js.map +0 -1
- package/lib/Socket/index.d.ts.map +0 -1
- package/lib/Socket/index.js.map +0 -1
- package/lib/Socket/messages-recv.d.ts.map +0 -1
- package/lib/Socket/messages-recv.js.map +0 -1
- package/lib/Socket/messages-send.d.ts.map +0 -1
- package/lib/Socket/messages-send.js.map +0 -1
- package/lib/Socket/mex.d.ts.map +0 -1
- package/lib/Socket/mex.js.map +0 -1
- package/lib/Socket/newsletter.d.ts.map +0 -1
- package/lib/Socket/newsletter.js.map +0 -1
- package/lib/Socket/smgss.d.ts +0 -119
- package/lib/Socket/smgss.d.ts.map +0 -1
- package/lib/Socket/smgss.js +0 -453
- package/lib/Socket/smgss.js.map +0 -1
- package/lib/Socket/socket.d.ts.map +0 -1
- package/lib/Socket/socket.js.map +0 -1
- package/lib/Store/index.d.ts +0 -4
- package/lib/Store/index.d.ts.map +0 -1
- package/lib/Store/index.js +0 -4
- package/lib/Store/index.js.map +0 -1
- package/lib/Store/make-in-memory-store.d.ts +0 -132
- package/lib/Store/make-in-memory-store.d.ts.map +0 -1
- package/lib/Store/make-in-memory-store.js +0 -450
- package/lib/Store/make-in-memory-store.js.map +0 -1
- package/lib/Store/make-ordered-dictionary.d.ts +0 -14
- package/lib/Store/make-ordered-dictionary.d.ts.map +0 -1
- package/lib/Store/make-ordered-dictionary.js +0 -80
- package/lib/Store/make-ordered-dictionary.js.map +0 -1
- package/lib/Store/object-repository.d.ts +0 -13
- package/lib/Store/object-repository.d.ts.map +0 -1
- package/lib/Store/object-repository.js +0 -24
- package/lib/Store/object-repository.js.map +0 -1
- package/lib/Types/Auth.d.ts.map +0 -1
- package/lib/Types/Auth.js.map +0 -1
- package/lib/Types/Bussines.d.ts.map +0 -1
- package/lib/Types/Bussines.js.map +0 -1
- package/lib/Types/Call.d.ts.map +0 -1
- package/lib/Types/Call.js.map +0 -1
- package/lib/Types/Chat.d.ts.map +0 -1
- package/lib/Types/Chat.js.map +0 -1
- package/lib/Types/Contact.d.ts.map +0 -1
- package/lib/Types/Contact.js.map +0 -1
- package/lib/Types/Events.d.ts.map +0 -1
- package/lib/Types/Events.js.map +0 -1
- package/lib/Types/GroupMetadata.d.ts.map +0 -1
- package/lib/Types/GroupMetadata.js.map +0 -1
- package/lib/Types/Label.d.ts.map +0 -1
- package/lib/Types/Label.js.map +0 -1
- package/lib/Types/LabelAssociation.d.ts.map +0 -1
- package/lib/Types/LabelAssociation.js.map +0 -1
- package/lib/Types/Message.d.ts.map +0 -1
- package/lib/Types/Message.js.map +0 -1
- package/lib/Types/Mex.d.ts.map +0 -1
- package/lib/Types/Mex.js.map +0 -1
- package/lib/Types/Product.d.ts.map +0 -1
- package/lib/Types/Product.js.map +0 -1
- package/lib/Types/Signal.d.ts.map +0 -1
- package/lib/Types/Signal.js.map +0 -1
- package/lib/Types/Socket.d.ts.map +0 -1
- package/lib/Types/Socket.js.map +0 -1
- package/lib/Types/State.d.ts.map +0 -1
- package/lib/Types/State.js.map +0 -1
- package/lib/Types/USync.d.ts.map +0 -1
- package/lib/Types/USync.js.map +0 -1
- package/lib/Types/index.d.ts.map +0 -1
- package/lib/Types/index.js.map +0 -1
- package/lib/Utils/auth-utils.d.ts.map +0 -1
- package/lib/Utils/auth-utils.js.map +0 -1
- package/lib/Utils/browser-utils.d.ts.map +0 -1
- package/lib/Utils/browser-utils.js.map +0 -1
- package/lib/Utils/business.d.ts.map +0 -1
- package/lib/Utils/business.js.map +0 -1
- package/lib/Utils/button-handler.d.ts +0 -28
- package/lib/Utils/button-handler.d.ts.map +0 -1
- package/lib/Utils/button-handler.js +0 -140
- package/lib/Utils/button-handler.js.map +0 -1
- package/lib/Utils/chat-utils.d.ts.map +0 -1
- package/lib/Utils/chat-utils.js.map +0 -1
- package/lib/Utils/companion-reg-client-utils.d.ts.map +0 -1
- package/lib/Utils/companion-reg-client-utils.js.map +0 -1
- package/lib/Utils/crypto.d.ts.map +0 -1
- package/lib/Utils/crypto.js.map +0 -1
- package/lib/Utils/decode-wa-message.d.ts.map +0 -1
- package/lib/Utils/decode-wa-message.js.map +0 -1
- package/lib/Utils/event-buffer.d.ts.map +0 -1
- package/lib/Utils/event-buffer.js.map +0 -1
- package/lib/Utils/generics.d.ts.map +0 -1
- package/lib/Utils/generics.js.map +0 -1
- package/lib/Utils/history.d.ts.map +0 -1
- package/lib/Utils/history.js.map +0 -1
- package/lib/Utils/identity-change-handler.d.ts.map +0 -1
- package/lib/Utils/identity-change-handler.js.map +0 -1
- package/lib/Utils/index.d.ts.map +0 -1
- package/lib/Utils/index.js.map +0 -1
- package/lib/Utils/interactive.d.ts +0 -60
- package/lib/Utils/interactive.d.ts.map +0 -1
- package/lib/Utils/interactive.js +0 -224
- package/lib/Utils/interactive.js.map +0 -1
- package/lib/Utils/link-preview.d.ts.map +0 -1
- package/lib/Utils/link-preview.js.map +0 -1
- package/lib/Utils/logger.d.ts.map +0 -1
- package/lib/Utils/logger.js.map +0 -1
- package/lib/Utils/lt-hash.d.ts.map +0 -1
- package/lib/Utils/lt-hash.js.map +0 -1
- package/lib/Utils/make-mutex.d.ts.map +0 -1
- package/lib/Utils/make-mutex.js.map +0 -1
- package/lib/Utils/message-composer.d.ts +0 -93
- package/lib/Utils/message-composer.d.ts.map +0 -1
- package/lib/Utils/message-composer.js +0 -311
- package/lib/Utils/message-composer.js.map +0 -1
- package/lib/Utils/message-retry-manager.d.ts.map +0 -1
- package/lib/Utils/message-retry-manager.js.map +0 -1
- package/lib/Utils/messages-media.d.ts.map +0 -1
- package/lib/Utils/messages-media.js.map +0 -1
- package/lib/Utils/messages-newsletter.d.ts +0 -74
- package/lib/Utils/messages-newsletter.d.ts.map +0 -1
- package/lib/Utils/messages-newsletter.js +0 -128
- package/lib/Utils/messages-newsletter.js.map +0 -1
- package/lib/Utils/messages.d.ts.map +0 -1
- package/lib/Utils/messages.js.map +0 -1
- package/lib/Utils/noise-handler.d.ts.map +0 -1
- package/lib/Utils/noise-handler.js.map +0 -1
- package/lib/Utils/offline-node-processor.d.ts.map +0 -1
- package/lib/Utils/offline-node-processor.js.map +0 -1
- package/lib/Utils/pre-key-manager.d.ts.map +0 -1
- package/lib/Utils/pre-key-manager.js.map +0 -1
- package/lib/Utils/process-message.d.ts.map +0 -1
- package/lib/Utils/process-message.js.map +0 -1
- package/lib/Utils/reporting-utils.d.ts.map +0 -1
- package/lib/Utils/reporting-utils.js.map +0 -1
- package/lib/Utils/shortcake-crypto.d.ts +0 -36
- package/lib/Utils/shortcake-crypto.d.ts.map +0 -1
- package/lib/Utils/shortcake-crypto.js +0 -71
- package/lib/Utils/shortcake-crypto.js.map +0 -1
- package/lib/Utils/shortcake.d.ts +0 -36
- package/lib/Utils/shortcake.d.ts.map +0 -1
- package/lib/Utils/shortcake.js +0 -162
- package/lib/Utils/shortcake.js.map +0 -1
- package/lib/Utils/signal.d.ts.map +0 -1
- package/lib/Utils/signal.js.map +0 -1
- package/lib/Utils/stanza-ack.d.ts.map +0 -1
- package/lib/Utils/stanza-ack.js.map +0 -1
- package/lib/Utils/sync-action-utils.d.ts.map +0 -1
- package/lib/Utils/sync-action-utils.js.map +0 -1
- package/lib/Utils/tc-token-utils.d.ts.map +0 -1
- package/lib/Utils/tc-token-utils.js.map +0 -1
- package/lib/Utils/use-multi-file-auth-state.d.ts.map +0 -1
- package/lib/Utils/use-multi-file-auth-state.js.map +0 -1
- package/lib/Utils/use-single-file-auth-state.d.ts +0 -6
- package/lib/Utils/use-single-file-auth-state.d.ts.map +0 -1
- package/lib/Utils/use-single-file-auth-state.js +0 -111
- package/lib/Utils/use-single-file-auth-state.js.map +0 -1
- package/lib/Utils/use-sqlite-auth-state.d.ts +0 -14
- package/lib/Utils/use-sqlite-auth-state.d.ts.map +0 -1
- package/lib/Utils/use-sqlite-auth-state.js +0 -107
- package/lib/Utils/use-sqlite-auth-state.js.map +0 -1
- package/lib/Utils/validate-connection.d.ts.map +0 -1
- package/lib/Utils/validate-connection.js.map +0 -1
- package/lib/WABinary/constants.d.ts.map +0 -1
- package/lib/WABinary/constants.js.map +0 -1
- package/lib/WABinary/decode.d.ts.map +0 -1
- package/lib/WABinary/decode.js.map +0 -1
- package/lib/WABinary/encode.d.ts.map +0 -1
- package/lib/WABinary/encode.js.map +0 -1
- package/lib/WABinary/generic-utils.d.ts.map +0 -1
- package/lib/WABinary/generic-utils.js.map +0 -1
- package/lib/WABinary/index.d.ts.map +0 -1
- package/lib/WABinary/index.js.map +0 -1
- package/lib/WABinary/jid-utils.d.ts.map +0 -1
- package/lib/WABinary/jid-utils.js.map +0 -1
- package/lib/WABinary/types.d.ts.map +0 -1
- package/lib/WABinary/types.js.map +0 -1
- package/lib/WAM/BinaryInfo.d.ts.map +0 -1
- package/lib/WAM/BinaryInfo.js.map +0 -1
- package/lib/WAM/constants.d.ts.map +0 -1
- package/lib/WAM/constants.js.map +0 -1
- package/lib/WAM/encode.d.ts.map +0 -1
- package/lib/WAM/encode.js.map +0 -1
- package/lib/WAM/index.d.ts.map +0 -1
- package/lib/WAM/index.js.map +0 -1
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/USyncContactProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js.map +0 -1
- package/lib/WAUSync/Protocols/index.d.ts.map +0 -1
- package/lib/WAUSync/Protocols/index.js.map +0 -1
- package/lib/WAUSync/USyncQuery.d.ts.map +0 -1
- package/lib/WAUSync/USyncQuery.js.map +0 -1
- package/lib/WAUSync/USyncUser.d.ts.map +0 -1
- package/lib/WAUSync/USyncUser.js.map +0 -1
- package/lib/WAUSync/index.d.ts.map +0 -1
- package/lib/WAUSync/index.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
package/lib/Socket/groups.d.ts
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
import { Boom } from '@hapi/boom';
|
|
2
1
|
import { proto } from '../../WAProto/index.js';
|
|
3
2
|
import type { GroupMetadata, ParticipantAction, SocketConfig, WAMessageKey } from '../Types/index.js';
|
|
4
3
|
import { type BinaryNode } from '../WABinary/index.js';
|
|
5
4
|
export declare const makeGroupsSocket: (config: SocketConfig) => {
|
|
6
5
|
groupMetadata: (jid: string) => Promise<GroupMetadata>;
|
|
6
|
+
/** groupMetadata con cache de 30s, invalidado automáticamente ante cambios reales de participantes. */
|
|
7
|
+
groupMetadataCached: (jid: string) => Promise<GroupMetadata>;
|
|
8
|
+
/**
|
|
9
|
+
* Resuelve un jid/@lid a su jid de número de teléfono real usando primero los participantes
|
|
10
|
+
* del grupo y, si no hay coincidencia, el mapeo LID↔PN nativo de Baileys (signalRepository).
|
|
11
|
+
* @param jidOrChatId el chatId del grupo, o directamente el array de participantes ya obtenido
|
|
12
|
+
* @param targetJid el jid/lid a resolver
|
|
13
|
+
*/
|
|
14
|
+
resolveParticipantJid: (jidOrChatId: string | GroupMetadata["participants"], targetJid: string) => Promise<string>;
|
|
15
|
+
/** true si el participante (jid o @lid) es admin/superadmin del grupo. */
|
|
16
|
+
isGroupAdmin: (jid: string, participantJid: string) => Promise<boolean>;
|
|
17
|
+
/** Lista de admins del grupo ya resueltos a jid de número de teléfono. */
|
|
18
|
+
getGroupAdmins: (jid: string) => Promise<{
|
|
19
|
+
jid: string;
|
|
20
|
+
admin: "admin" | "superadmin" | null;
|
|
21
|
+
}[]>;
|
|
7
22
|
groupCreate: (subject: string, participants: string[]) => Promise<GroupMetadata>;
|
|
8
23
|
groupLeave: (id: string) => Promise<void>;
|
|
9
24
|
groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
|
@@ -44,15 +59,6 @@ export declare const makeGroupsSocket: (config: SocketConfig) => {
|
|
|
44
59
|
groupFetchAllParticipating: () => Promise<{
|
|
45
60
|
[_: string]: GroupMetadata;
|
|
46
61
|
}>;
|
|
47
|
-
getAdminStatus: (groupJid: string, senderJid?: string) => Promise<{
|
|
48
|
-
isAdmin: boolean;
|
|
49
|
-
isBotAdmin: boolean;
|
|
50
|
-
}>;
|
|
51
|
-
serverProps: {
|
|
52
|
-
privacyTokenOn1to1: boolean;
|
|
53
|
-
profilePicPrivacyToken: boolean;
|
|
54
|
-
lidTrustedTokenIssueToLid: boolean;
|
|
55
|
-
};
|
|
56
62
|
createCallLink: (type: "audio" | "video", event?: {
|
|
57
63
|
startTime: number;
|
|
58
64
|
}, timeoutMs?: number) => Promise<string | undefined>;
|
|
@@ -80,15 +86,9 @@ export declare const makeGroupsSocket: (config: SocketConfig) => {
|
|
|
80
86
|
fetchBlocklist: () => Promise<(string | undefined)[]>;
|
|
81
87
|
fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
82
88
|
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
83
|
-
findUserId: (pnOrLid: string) => Promise<{
|
|
84
|
-
phoneNumber: string;
|
|
85
|
-
lid: string;
|
|
86
|
-
}>;
|
|
87
89
|
updateProfilePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload, dimensions?: {
|
|
88
90
|
width: number;
|
|
89
91
|
height: number;
|
|
90
|
-
}, options?: {
|
|
91
|
-
full?: boolean;
|
|
92
92
|
}) => Promise<void>;
|
|
93
93
|
removeProfilePicture: (jid: string) => Promise<void>;
|
|
94
94
|
updateProfileStatus: (status: string) => Promise<void>;
|
|
@@ -110,7 +110,6 @@ export declare const makeGroupsSocket: (config: SocketConfig) => {
|
|
|
110
110
|
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
|
|
111
111
|
addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
112
112
|
removeContact: (jid: string) => Promise<void>;
|
|
113
|
-
placeholderResendCache: import("../Types/index.js").CacheStore;
|
|
114
113
|
addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
|
|
115
114
|
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
116
115
|
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
@@ -130,7 +129,6 @@ export declare const makeGroupsSocket: (config: SocketConfig) => {
|
|
|
130
129
|
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
131
130
|
flush(): boolean;
|
|
132
131
|
isBuffering(): boolean;
|
|
133
|
-
destroy(): void;
|
|
134
132
|
};
|
|
135
133
|
authState: {
|
|
136
134
|
creds: import("../Types/index.js").AuthenticationCreds;
|
|
@@ -146,9 +144,8 @@ export declare const makeGroupsSocket: (config: SocketConfig) => {
|
|
|
146
144
|
sendNode: (frame: BinaryNode) => Promise<void>;
|
|
147
145
|
logout: (msg?: string) => Promise<void>;
|
|
148
146
|
end: (error: Error | undefined) => Promise<void>;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
uploadPreKeys: (count?: number) => Promise<void>;
|
|
147
|
+
onUnexpectedError: (err: Error | import("@hapi/boom").Boom, msg: string) => void;
|
|
148
|
+
uploadPreKeys: (count?: number, retryCount?: number) => Promise<void>;
|
|
152
149
|
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
153
150
|
digestKeyBundle: () => Promise<void>;
|
|
154
151
|
rotateSignedPreKey: () => Promise<void>;
|
|
@@ -163,8 +160,6 @@ export declare const makeGroupsSocket: (config: SocketConfig) => {
|
|
|
163
160
|
jid: string;
|
|
164
161
|
exists: boolean;
|
|
165
162
|
}[] | undefined>;
|
|
166
|
-
fetchAccountReachoutTimelock: () => Promise<import("../Types/index.js").ReachoutTimelockState>;
|
|
167
|
-
fetchNewChatMessageCap: () => Promise<import("../Types/index.js").NewChatMessageCapInfo>;
|
|
168
163
|
};
|
|
169
164
|
export declare const extractGroupMetadata: (result: BinaryNode) => GroupMetadata;
|
|
170
165
|
export type GroupsSocket = ReturnType<typeof makeGroupsSocket>;
|
package/lib/Socket/groups.js
CHANGED
|
@@ -4,107 +4,10 @@ import { WAMessageAddressingMode, WAMessageStubType } from '../Types/index.js';
|
|
|
4
4
|
import { generateMessageIDV2, unixTimestampSeconds } from '../Utils/index.js';
|
|
5
5
|
import { getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString, isLidUser, isPnUser, jidEncode, jidNormalizedUser } from '../WABinary/index.js';
|
|
6
6
|
import { makeChatsSocket } from './chats.js';
|
|
7
|
-
const
|
|
8
|
-
const unresolvedLids = new Set();
|
|
9
|
-
for (const meta of metadataList) {
|
|
10
|
-
for (const p of meta.participants) {
|
|
11
|
-
if (!p.phoneNumber && isLidUser(p.id)) {
|
|
12
|
-
unresolvedLids.add(p.id);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
if (unresolvedLids.size === 0) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
const resolved = await lidMapping.getPNsForLIDs([...unresolvedLids]);
|
|
20
|
-
if (!resolved?.length) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
const lidToPn = new Map(resolved.map(({ lid, pn }) => [lid, pn]));
|
|
24
|
-
for (const meta of metadataList) {
|
|
25
|
-
meta.participants = meta.participants.map(p => {
|
|
26
|
-
const pn = lidToPn.get(p.id);
|
|
27
|
-
if (!pn) {
|
|
28
|
-
return p;
|
|
29
|
-
}
|
|
30
|
-
return { ...p, id: pn, phoneNumber: pn, lid: p.id };
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
};
|
|
7
|
+
const GROUP_METADATA_CACHE_TTL_MS = 30_000;
|
|
34
8
|
export const makeGroupsSocket = (config) => {
|
|
35
9
|
const sock = makeChatsSocket(config);
|
|
36
|
-
const { authState, ev, query, upsertMessage, signalRepository } = sock;
|
|
37
|
-
const { cachedGroupMetadata, groupCacheTTL } = config;
|
|
38
|
-
const groupMetadataCache = new Map();
|
|
39
|
-
const cacheTTL = groupCacheTTL > 0 ? groupCacheTTL : 5 * 60 * 1000;
|
|
40
|
-
const getCachedGroupMetadata = async (jid) => {
|
|
41
|
-
if (cachedGroupMetadata) {
|
|
42
|
-
const cached = await cachedGroupMetadata(jid);
|
|
43
|
-
if (cached && Array.isArray(cached.participants)) {
|
|
44
|
-
return cached;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
const entry = groupMetadataCache.get(jid);
|
|
48
|
-
if (entry && Date.now() - entry.ts < cacheTTL) {
|
|
49
|
-
return entry.data;
|
|
50
|
-
}
|
|
51
|
-
return undefined;
|
|
52
|
-
};
|
|
53
|
-
const setCachedGroupMetadata = (jid, data) => {
|
|
54
|
-
groupMetadataCache.set(jid, { data, ts: Date.now() });
|
|
55
|
-
};
|
|
56
|
-
ev.on('groups.update', updates => {
|
|
57
|
-
for (const update of updates) {
|
|
58
|
-
if (!update.id) {
|
|
59
|
-
continue;
|
|
60
|
-
}
|
|
61
|
-
const entry = groupMetadataCache.get(update.id);
|
|
62
|
-
if (entry) {
|
|
63
|
-
groupMetadataCache.set(update.id, { data: { ...entry.data, ...update }, ts: entry.ts });
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
const refreshDebounce = new Set();
|
|
68
|
-
const refreshGroupMetadata = async (jid) => {
|
|
69
|
-
if (refreshDebounce.has(jid)) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
refreshDebounce.add(jid);
|
|
73
|
-
setTimeout(() => refreshDebounce.delete(jid), 2000);
|
|
74
|
-
try {
|
|
75
|
-
const result = await groupQuery(jid, 'get', [{ tag: 'query', attrs: { request: 'interactive' } }]);
|
|
76
|
-
const meta = extractGroupMetadata(result);
|
|
77
|
-
setCachedGroupMetadata(jid, meta);
|
|
78
|
-
ev.emit('groups.update', [meta]);
|
|
79
|
-
}
|
|
80
|
-
catch { }
|
|
81
|
-
};
|
|
82
|
-
ev.on('group-participants.update', ({ id, participants, action }) => {
|
|
83
|
-
const entry = groupMetadataCache.get(id);
|
|
84
|
-
if (entry && Array.isArray(entry.data.participants)) {
|
|
85
|
-
const meta = { ...entry.data, participants: [...entry.data.participants] };
|
|
86
|
-
const jids = participants.map(p => p.id);
|
|
87
|
-
if (action === 'add') {
|
|
88
|
-
const existing = new Set(meta.participants.map(p => p.id));
|
|
89
|
-
for (const p of participants) {
|
|
90
|
-
if (!existing.has(p.id)) {
|
|
91
|
-
meta.participants.push(p);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
else if (action === 'remove') {
|
|
96
|
-
meta.participants = meta.participants.filter(p => !jids.includes(p.id));
|
|
97
|
-
}
|
|
98
|
-
else if (action === 'promote') {
|
|
99
|
-
meta.participants = meta.participants.map(p => (jids.includes(p.id) ? { ...p, admin: 'admin' } : p));
|
|
100
|
-
}
|
|
101
|
-
else if (action === 'demote') {
|
|
102
|
-
meta.participants = meta.participants.map(p => (jids.includes(p.id) ? { ...p, admin: null } : p));
|
|
103
|
-
}
|
|
104
|
-
groupMetadataCache.set(id, { data: meta, ts: entry.ts });
|
|
105
|
-
}
|
|
106
|
-
void refreshGroupMetadata(id);
|
|
107
|
-
});
|
|
10
|
+
const { authState, ev, query, upsertMessage, signalRepository, logger } = sock;
|
|
108
11
|
const groupQuery = async (jid, type, content) => query({
|
|
109
12
|
tag: 'iq',
|
|
110
13
|
attrs: {
|
|
@@ -115,15 +18,84 @@ export const makeGroupsSocket = (config) => {
|
|
|
115
18
|
content
|
|
116
19
|
});
|
|
117
20
|
const groupMetadata = async (jid) => {
|
|
118
|
-
const cached = await getCachedGroupMetadata(jid);
|
|
119
|
-
if (cached) {
|
|
120
|
-
return cached;
|
|
121
|
-
}
|
|
122
21
|
const result = await groupQuery(jid, 'get', [{ tag: 'query', attrs: { request: 'interactive' } }]);
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
22
|
+
return extractGroupMetadata(result);
|
|
23
|
+
};
|
|
24
|
+
const groupMetadataCache = new Map();
|
|
25
|
+
const invalidateGroupMetadataCache = (jid) => {
|
|
26
|
+
if (jid)
|
|
27
|
+
groupMetadataCache.delete(jid);
|
|
28
|
+
else
|
|
29
|
+
groupMetadataCache.clear();
|
|
30
|
+
};
|
|
31
|
+
ev.on('group-participants.update', ({ id }) => invalidateGroupMetadataCache(id));
|
|
32
|
+
ev.on('groups.update', updates => {
|
|
33
|
+
for (const update of updates) {
|
|
34
|
+
if (update?.id)
|
|
35
|
+
invalidateGroupMetadataCache(update.id);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
/**
|
|
39
|
+
* groupMetadata con cache corto (30s) para evitar golpear WhatsApp en checks repetidos
|
|
40
|
+
* (ej. isGroupAdmin llamado por cada mensaje). Se invalida automáticamente ante cualquier
|
|
41
|
+
* cambio real de participantes.
|
|
42
|
+
*/
|
|
43
|
+
const groupMetadataCached = async (jid) => {
|
|
44
|
+
const cached = groupMetadataCache.get(jid);
|
|
45
|
+
if (cached && cached.expiresAt > Date.now()) {
|
|
46
|
+
return cached.data;
|
|
47
|
+
}
|
|
48
|
+
const data = await groupMetadata(jid);
|
|
49
|
+
groupMetadataCache.set(jid, { data, expiresAt: Date.now() + GROUP_METADATA_CACHE_TTL_MS });
|
|
50
|
+
return data;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Resuelve un jid (que puede venir como @lid) a su jid de número de teléfono real.
|
|
54
|
+
*/
|
|
55
|
+
const resolveParticipantJid = async (jidOrChatId, targetJid) => {
|
|
56
|
+
if (!targetJid)
|
|
57
|
+
return targetJid;
|
|
58
|
+
const normalized = jidNormalizedUser(targetJid);
|
|
59
|
+
if (!isLidUser(normalized))
|
|
60
|
+
return normalized;
|
|
61
|
+
const participants = Array.isArray(jidOrChatId) ? jidOrChatId : (await groupMetadataCached(jidOrChatId)).participants;
|
|
62
|
+
const match = participants.find(p => jidNormalizedUser(p.id) === normalized || (p.lid && jidNormalizedUser(p.lid) === normalized));
|
|
63
|
+
if (match?.phoneNumber)
|
|
64
|
+
return jidNormalizedUser(match.phoneNumber);
|
|
65
|
+
if (match?.jid && !isLidUser(match.jid))
|
|
66
|
+
return jidNormalizedUser(match.jid);
|
|
67
|
+
try {
|
|
68
|
+
const pn = await signalRepository.lidMapping.getPNForLID(normalized);
|
|
69
|
+
if (pn)
|
|
70
|
+
return jidNormalizedUser(pn);
|
|
71
|
+
}
|
|
72
|
+
catch (err) {
|
|
73
|
+
logger.trace({ err, jid: normalized }, 'no se pudo resolver LID a PN via signalRepository');
|
|
74
|
+
}
|
|
75
|
+
return normalized;
|
|
76
|
+
};
|
|
77
|
+
/** true si el jid (número o @lid) es admin/superadmin del grupo. */
|
|
78
|
+
const isGroupAdmin = async (jid, participantJid) => {
|
|
79
|
+
if (!participantJid)
|
|
80
|
+
return false;
|
|
81
|
+
const normalized = jidNormalizedUser(participantJid);
|
|
82
|
+
const meta = await groupMetadataCached(jid);
|
|
83
|
+
const participant = meta.participants.find(p => {
|
|
84
|
+
const pid = jidNormalizedUser(p.id);
|
|
85
|
+
return (pid === normalized ||
|
|
86
|
+
(p.lid && jidNormalizedUser(p.lid) === normalized) ||
|
|
87
|
+
(p.phoneNumber && jidNormalizedUser(p.phoneNumber) === normalized));
|
|
88
|
+
});
|
|
89
|
+
return participant?.admin === 'admin' || participant?.admin === 'superadmin';
|
|
90
|
+
};
|
|
91
|
+
/** Lista de admins del grupo ya resueltos a jid de número de teléfono (no @lid). */
|
|
92
|
+
const getGroupAdmins = async (jid) => {
|
|
93
|
+
const meta = await groupMetadataCached(jid);
|
|
94
|
+
const admins = meta.participants.filter(p => p.admin === 'admin' || p.admin === 'superadmin');
|
|
95
|
+
return Promise.all(admins.map(async (p) => ({
|
|
96
|
+
jid: await resolveParticipantJid(meta.participants, p.id),
|
|
97
|
+
admin: p.admin
|
|
98
|
+
})));
|
|
127
99
|
};
|
|
128
100
|
const groupFetchAllParticipating = async () => {
|
|
129
101
|
const result = await query({
|
|
@@ -157,10 +129,7 @@ export const makeGroupsSocket = (config) => {
|
|
|
157
129
|
data[meta.id] = meta;
|
|
158
130
|
}
|
|
159
131
|
}
|
|
160
|
-
|
|
161
|
-
for (const meta of Object.values(data)) {
|
|
162
|
-
setCachedGroupMetadata(meta.id, meta);
|
|
163
|
-
}
|
|
132
|
+
// TODO: properly parse LID / PN DATA
|
|
164
133
|
sock.ev.emit('groups.update', Object.values(data));
|
|
165
134
|
return data;
|
|
166
135
|
};
|
|
@@ -175,6 +144,10 @@ export const makeGroupsSocket = (config) => {
|
|
|
175
144
|
return {
|
|
176
145
|
...sock,
|
|
177
146
|
groupMetadata,
|
|
147
|
+
groupMetadataCached,
|
|
148
|
+
resolveParticipantJid,
|
|
149
|
+
isGroupAdmin,
|
|
150
|
+
getGroupAdmins,
|
|
178
151
|
groupCreate: async (subject, participants) => {
|
|
179
152
|
const key = generateMessageIDV2();
|
|
180
153
|
const result = await groupQuery('@g.us', 'set', [
|
|
@@ -291,23 +264,12 @@ export const makeGroupsSocket = (config) => {
|
|
|
291
264
|
const result = getBinaryNodeChild(results, 'group');
|
|
292
265
|
return result?.attrs.jid;
|
|
293
266
|
},
|
|
294
|
-
/**
|
|
295
|
-
* revoke a v4 invite for someone
|
|
296
|
-
* @param groupJid group jid
|
|
297
|
-
* @param invitedJid jid of person you invited
|
|
298
|
-
* @returns true if successful
|
|
299
|
-
*/
|
|
300
267
|
groupRevokeInviteV4: async (groupJid, invitedJid) => {
|
|
301
268
|
const result = await groupQuery(groupJid, 'set', [
|
|
302
269
|
{ tag: 'revoke', attrs: {}, content: [{ tag: 'participant', attrs: { jid: invitedJid } }] }
|
|
303
270
|
]);
|
|
304
271
|
return !!result;
|
|
305
272
|
},
|
|
306
|
-
/**
|
|
307
|
-
* accept a GroupInviteMessage
|
|
308
|
-
* @param key the key of the invite message, or optionally only provide the jid of the person who sent the invite
|
|
309
|
-
* @param inviteMessage the message to accept
|
|
310
|
-
*/
|
|
311
273
|
groupAcceptInviteV4: ev.createBufferedFunction(async (key, inviteMessage) => {
|
|
312
274
|
key = typeof key === 'string' ? { remoteJid: key } : key;
|
|
313
275
|
const results = await groupQuery(inviteMessage.groupJid, 'set', [
|
|
@@ -320,10 +282,7 @@ export const makeGroupsSocket = (config) => {
|
|
|
320
282
|
}
|
|
321
283
|
}
|
|
322
284
|
]);
|
|
323
|
-
// if we have the full message key
|
|
324
|
-
// update the invite message to be expired
|
|
325
285
|
if (key.id) {
|
|
326
|
-
// create new invite message that is expired
|
|
327
286
|
inviteMessage = proto.Message.GroupInviteMessage.fromObject(inviteMessage);
|
|
328
287
|
inviteMessage.inviteExpiration = 0;
|
|
329
288
|
inviteMessage.inviteCode = '';
|
|
@@ -338,7 +297,6 @@ export const makeGroupsSocket = (config) => {
|
|
|
338
297
|
}
|
|
339
298
|
]);
|
|
340
299
|
}
|
|
341
|
-
// generate the group add message
|
|
342
300
|
await upsertMessage({
|
|
343
301
|
key: {
|
|
344
302
|
remoteJid: inviteMessage.groupJid,
|
|
@@ -374,47 +332,12 @@ export const makeGroupsSocket = (config) => {
|
|
|
374
332
|
{ tag: 'membership_approval_mode', attrs: {}, content: [{ tag: 'group_join', attrs: { state: mode } }] }
|
|
375
333
|
]);
|
|
376
334
|
},
|
|
377
|
-
groupFetchAllParticipating
|
|
378
|
-
getAdminStatus: async (groupJid, senderJid) => {
|
|
379
|
-
const normalizeJid = (jid) => {
|
|
380
|
-
if (!jid) {
|
|
381
|
-
return null;
|
|
382
|
-
}
|
|
383
|
-
try {
|
|
384
|
-
return jidNormalizedUser(jid).split('@')[0] ?? null;
|
|
385
|
-
}
|
|
386
|
-
catch {
|
|
387
|
-
return String(jid).split('@')[0] ?? null;
|
|
388
|
-
}
|
|
389
|
-
};
|
|
390
|
-
const botJid = authState.creds.me?.id;
|
|
391
|
-
const meta = await groupMetadata(groupJid).catch(() => undefined);
|
|
392
|
-
if (!meta || !Array.isArray(meta.participants)) {
|
|
393
|
-
return { isAdmin: false, isBotAdmin: false };
|
|
394
|
-
}
|
|
395
|
-
const senderNorm = normalizeJid(senderJid);
|
|
396
|
-
const botNorm = normalizeJid(botJid);
|
|
397
|
-
const isAdminIn = (norm) => norm !== null &&
|
|
398
|
-
meta.participants.some(p => {
|
|
399
|
-
const pid = normalizeJid(p.id ?? p.phoneNumber ?? p.lid);
|
|
400
|
-
return pid === norm && (p.admin === 'admin' || p.admin === 'superadmin');
|
|
401
|
-
});
|
|
402
|
-
const isAdmin = isAdminIn(senderNorm);
|
|
403
|
-
let isBotAdmin = isAdminIn(botNorm);
|
|
404
|
-
if (!isBotAdmin && botNorm) {
|
|
405
|
-
const owners = [meta.owner, meta.ownerPn].filter(Boolean).map(normalizeJid);
|
|
406
|
-
if (owners.includes(botNorm)) {
|
|
407
|
-
isBotAdmin = true;
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
return { isAdmin, isBotAdmin };
|
|
411
|
-
}
|
|
335
|
+
groupFetchAllParticipating
|
|
412
336
|
};
|
|
413
337
|
};
|
|
414
338
|
export const extractGroupMetadata = (result) => {
|
|
415
339
|
const group = getBinaryNodeChild(result, 'group');
|
|
416
340
|
if (!group) {
|
|
417
|
-
// Mirror WAWeb: surface server/client errors with their code+text instead of crashing.
|
|
418
341
|
const errorNode = getBinaryNodeChild(result, 'error');
|
|
419
342
|
if (errorNode) {
|
|
420
343
|
const code = errorNode.attrs.code ? +errorNode.attrs.code : 500;
|
|
@@ -473,12 +396,10 @@ export const extractGroupMetadata = (result) => {
|
|
|
473
396
|
joinApprovalMode: !!getBinaryNodeChild(group, 'membership_approval_mode'),
|
|
474
397
|
memberAddMode,
|
|
475
398
|
participants: getBinaryNodeChildren(group, 'participant').map(({ attrs }) => {
|
|
476
|
-
const isLid = isLidUser(attrs.jid);
|
|
477
|
-
const hasPn = isPnUser(attrs.phone_number);
|
|
478
399
|
return {
|
|
479
|
-
id:
|
|
480
|
-
phoneNumber:
|
|
481
|
-
lid:
|
|
400
|
+
id: attrs.jid,
|
|
401
|
+
phoneNumber: isLidUser(attrs.jid) && isPnUser(attrs.phone_number) ? attrs.phone_number : undefined,
|
|
402
|
+
lid: isPnUser(attrs.jid) && isLidUser(attrs.lid) ? attrs.lid : undefined,
|
|
482
403
|
username: attrs.participant_username || attrs.username || undefined,
|
|
483
404
|
admin: (attrs.type || null)
|
|
484
405
|
};
|
|
@@ -487,4 +408,3 @@ export const extractGroupMetadata = (result) => {
|
|
|
487
408
|
};
|
|
488
409
|
return metadata;
|
|
489
410
|
};
|
|
490
|
-
//# sourceMappingURL=groups.js.map
|