@d0v3riz/baileys 6.7.6 → 6.7.7
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/lib/Defaults/baileys-version.json +1 -1
- package/lib/Socket/business.d.ts +7 -0
- package/lib/Socket/index.d.ts +7 -0
- package/lib/Socket/messages-recv.d.ts +7 -0
- package/lib/Socket/messages-recv.js +1 -1
- package/lib/Socket/messages-send.d.ts +6 -1
- package/lib/Socket/messages-send.js +3 -1
- package/lib/Socket/registration.d.ts +7 -0
- package/package.json +1 -1
package/lib/Socket/business.d.ts
CHANGED
|
@@ -34,6 +34,13 @@ export declare const makeBusinessSocket: (config: SocketConfig) => {
|
|
|
34
34
|
[_: string]: string;
|
|
35
35
|
}>;
|
|
36
36
|
sendPeerDataOperationMessage: (pdoMessage: import("../Types").WAProto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
|
|
37
|
+
createParticipantNodes: (jids: string[], message: import("../Types").WAProto.IMessage, extraAttrs?: {
|
|
38
|
+
[key: string]: string;
|
|
39
|
+
} | undefined) => Promise<{
|
|
40
|
+
nodes: BinaryNode[];
|
|
41
|
+
shouldIncludeDeviceIdentity: boolean;
|
|
42
|
+
}>;
|
|
43
|
+
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("../WABinary").JidWithDevice[]>;
|
|
37
44
|
updateMediaMessage: (message: import("../Types").WAProto.IWebMessageInfo) => Promise<import("../Types").WAProto.IWebMessageInfo>;
|
|
38
45
|
sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<import("../Types").WAProto.WebMessageInfo | undefined>;
|
|
39
46
|
groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>;
|
package/lib/Socket/index.d.ts
CHANGED
|
@@ -35,6 +35,13 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
|
35
35
|
[_: string]: string;
|
|
36
36
|
}>;
|
|
37
37
|
sendPeerDataOperationMessage: (pdoMessage: import("../Types").WAProto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
|
|
38
|
+
createParticipantNodes: (jids: string[], message: import("../Types").WAProto.IMessage, extraAttrs?: {
|
|
39
|
+
[key: string]: string;
|
|
40
|
+
} | undefined) => Promise<{
|
|
41
|
+
nodes: import("../index").BinaryNode[];
|
|
42
|
+
shouldIncludeDeviceIdentity: boolean;
|
|
43
|
+
}>;
|
|
44
|
+
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("../index").JidWithDevice[]>;
|
|
38
45
|
updateMediaMessage: (message: import("../Types").WAProto.IWebMessageInfo) => Promise<import("../Types").WAProto.IWebMessageInfo>;
|
|
39
46
|
sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<import("../Types").WAProto.WebMessageInfo | undefined>;
|
|
40
47
|
groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>;
|
|
@@ -21,6 +21,13 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
21
21
|
[_: string]: string;
|
|
22
22
|
}>;
|
|
23
23
|
sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
|
|
24
|
+
createParticipantNodes: (jids: string[], message: proto.IMessage, extraAttrs?: {
|
|
25
|
+
[key: string]: string;
|
|
26
|
+
} | undefined) => Promise<{
|
|
27
|
+
nodes: BinaryNode[];
|
|
28
|
+
shouldIncludeDeviceIdentity: boolean;
|
|
29
|
+
}>;
|
|
30
|
+
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("../WABinary").JidWithDevice[]>;
|
|
24
31
|
updateMediaMessage: (message: proto.IWebMessageInfo) => Promise<proto.IWebMessageInfo>;
|
|
25
32
|
sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<proto.WebMessageInfo | undefined>;
|
|
26
33
|
groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>;
|
|
@@ -320,7 +320,7 @@ const makeMessagesRecvSocket = (config) => {
|
|
|
320
320
|
const setPicture = (0, WABinary_1.getBinaryNodeChild)(node, 'set');
|
|
321
321
|
const delPicture = (0, WABinary_1.getBinaryNodeChild)(node, 'delete');
|
|
322
322
|
ev.emit('contacts.update', [{
|
|
323
|
-
id: (0, WABinary_1.jidNormalizedUser)((_a = node === null || node === void 0 ? void 0 : node.attrs) === null || _a === void 0 ? void 0 : _a.
|
|
323
|
+
id: (0, WABinary_1.jidNormalizedUser)((_a = node === null || node === void 0 ? void 0 : node.attrs) === null || _a === void 0 ? void 0 : _a.from) || ((_c = (_b = (setPicture || delPicture)) === null || _b === void 0 ? void 0 : _b.attrs) === null || _c === void 0 ? void 0 : _c.hash) || '',
|
|
324
324
|
imgUrl: setPicture ? 'changed' : 'removed'
|
|
325
325
|
}]);
|
|
326
326
|
if ((0, WABinary_1.isJidGroup)(from)) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Boom } from '@hapi/boom';
|
|
3
3
|
import { proto } from '../../WAProto';
|
|
4
4
|
import { AnyMessageContent, MediaConnInfo, MessageReceiptType, MessageRelayOptions, MiscMessageGenerationOptions, SocketConfig, WAMessageKey } from '../Types';
|
|
5
|
-
import { BinaryNode } from '../WABinary';
|
|
5
|
+
import { BinaryNode, JidWithDevice } from '../WABinary';
|
|
6
6
|
export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
7
7
|
getPrivacyTokens: (jids: string[]) => Promise<BinaryNode>;
|
|
8
8
|
assertSessions: (jids: string[], force: boolean) => Promise<boolean>;
|
|
@@ -16,6 +16,11 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
|
16
16
|
[_: string]: string;
|
|
17
17
|
}>;
|
|
18
18
|
sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
|
|
19
|
+
createParticipantNodes: (jids: string[], message: proto.IMessage, extraAttrs?: BinaryNode['attrs']) => Promise<{
|
|
20
|
+
nodes: BinaryNode[];
|
|
21
|
+
shouldIncludeDeviceIdentity: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<JidWithDevice[]>;
|
|
19
24
|
updateMediaMessage: (message: proto.IWebMessageInfo) => Promise<proto.IWebMessageInfo>;
|
|
20
25
|
sendMessage: (jid: string, content: AnyMessageContent, options?: MiscMessageGenerationOptions) => Promise<proto.WebMessageInfo | undefined>;
|
|
21
26
|
groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>;
|
|
@@ -319,7 +319,7 @@ const makeMessagesSocket = (config) => {
|
|
|
319
319
|
if (groupData && Array.isArray(groupData === null || groupData === void 0 ? void 0 : groupData.participants)) {
|
|
320
320
|
logger.trace({ jid, participants: groupData.participants.length }, 'using cached group metadata');
|
|
321
321
|
}
|
|
322
|
-
else {
|
|
322
|
+
else if (!isStatus) {
|
|
323
323
|
groupData = await groupMetadata(jid);
|
|
324
324
|
}
|
|
325
325
|
return groupData;
|
|
@@ -561,6 +561,8 @@ const makeMessagesSocket = (config) => {
|
|
|
561
561
|
waUploadToServer,
|
|
562
562
|
fetchPrivacySettings,
|
|
563
563
|
sendPeerDataOperationMessage,
|
|
564
|
+
createParticipantNodes,
|
|
565
|
+
getUSyncDevices,
|
|
564
566
|
updateMediaMessage: async (message) => {
|
|
565
567
|
const content = (0, Utils_1.assertMediaContent)(message.message);
|
|
566
568
|
const mediaKey = content.mediaKey;
|
|
@@ -36,6 +36,13 @@ export declare const makeRegistrationSocket: (config: SocketConfig) => {
|
|
|
36
36
|
[_: string]: string;
|
|
37
37
|
}>;
|
|
38
38
|
sendPeerDataOperationMessage: (pdoMessage: import("../Types").WAProto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
|
|
39
|
+
createParticipantNodes: (jids: string[], message: import("../Types").WAProto.IMessage, extraAttrs?: {
|
|
40
|
+
[key: string]: string;
|
|
41
|
+
} | undefined) => Promise<{
|
|
42
|
+
nodes: import("../WABinary").BinaryNode[];
|
|
43
|
+
shouldIncludeDeviceIdentity: boolean;
|
|
44
|
+
}>;
|
|
45
|
+
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("../WABinary").JidWithDevice[]>;
|
|
39
46
|
updateMediaMessage: (message: import("../Types").WAProto.IWebMessageInfo) => Promise<import("../Types").WAProto.IWebMessageInfo>;
|
|
40
47
|
sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<import("../Types").WAProto.WebMessageInfo | undefined>;
|
|
41
48
|
groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>;
|