@fvckerss/baileys 1.0.15 → 1.0.17

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.
@@ -4,8 +4,15 @@ import { generateMessageID, generateMessageIDV2, unixTimestampSeconds } from '..
4
4
  import logger from '../Utils/logger.js';
5
5
  import { getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString, jidEncode, jidNormalizedUser } from '../WABinary/index.js';
6
6
  import { makeBusinessSocket } from './business.js';
7
+ import { Dugong } from './dugong.js';
7
8
  export const makeCommunitiesSocket = (config) => {
8
9
  const sock = makeBusinessSocket(config);
10
+ const dugong = new Dugong(
11
+ sock.waUploadToServer,
12
+ sock.relayMessage.bind(sock),
13
+ config,
14
+ sock
15
+ );
9
16
  const { authState, ev, query, upsertMessage } = sock;
10
17
  const communityQuery = async (jid, type, content) => query({
11
18
  tag: 'iq',
@@ -84,8 +91,10 @@ export const makeCommunitiesSocket = (config) => {
84
91
  await sock.cleanDirtyBits('groups');
85
92
  });
86
93
  return {
87
- ...sock,
88
- communityMetadata,
94
+ ...sock,
95
+ handleGroupStory: (content, jid, quoted, options) =>
96
+ dugong.handleGroupStory(content, jid, quoted, options),
97
+ communityMetadata,
89
98
  communityCreate: async (subject, body) => {
90
99
  const descriptionId = generateMessageID().substring(0, 12);
91
100
  const result = await communityQuery('@g.us', 'set', [
@@ -550,7 +550,8 @@ const sanitizeMessagePayload = message => {
550
550
  "buttonsMessage",
551
551
  "templateMessage",
552
552
  "interactiveMessage",
553
- "viewOnceMessage"
553
+ "viewOnceMessage",
554
+ "groupStatusMessageV2"
554
555
  ]
555
556
 
556
557
  const isProto = protoKeys.some(k => k in (message || {}))
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fvckerss/baileys",
3
3
  "type": "module",
4
- "version": "1.0.15",
4
+ "version": "1.0.17",
5
5
  "description": "Baileys mod by Swiper",
6
6
  "keywords": [
7
7
  "whatsapp",