nishiki-bail 1.1.4 → 1.1.6
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proto } from '../../WAProto/index.js';
|
|
2
|
-
import { generateWAMessage, generateWAMessageFromContent, generateMessageID, jidNormalizedUser, isJidGroup, STORIES_JID, delay } from '../Utils/index.js';
|
|
2
|
+
import { generateWAMessage, generateWAMessageFromContent, generateWAMessageContent, generateMessageID, jidNormalizedUser, isJidGroup, STORIES_JID, delay } from '../Utils/index.js';
|
|
3
3
|
import { getUrlInfo } from '../Utils/link-preview.js';
|
|
4
|
-
import { jidNormalizedUser as jidNormalizedUserBinary, isJidGroup as isJidGroupBinary
|
|
4
|
+
import { jidNormalizedUser as jidNormalizedUserBinary, isJidGroup as isJidGroupBinary } from '../WABinary/index.js';
|
|
5
5
|
import crypto from 'crypto';
|
|
6
6
|
import fs from 'fs';
|
|
7
7
|
import path from 'path';
|
|
@@ -15,7 +15,7 @@ class ClutchHandler {
|
|
|
15
15
|
this.sock = sock;
|
|
16
16
|
|
|
17
17
|
this.bail = {
|
|
18
|
-
generateWAMessageContent: this.utils.generateWAMessageContent ||
|
|
18
|
+
generateWAMessageContent: this.utils.generateWAMessageContent || generateWAMessageContent,
|
|
19
19
|
generateMessageID: generateMessageID,
|
|
20
20
|
getContentType: (msg) => Object.keys(msg.message || {})[0]
|
|
21
21
|
};
|
|
@@ -688,7 +688,7 @@ class ClutchHandler {
|
|
|
688
688
|
|
|
689
689
|
for (const id of jids) {
|
|
690
690
|
const isGroup = isJidGroupBinary(id);
|
|
691
|
-
const isPrivate =
|
|
691
|
+
const isPrivate = !isJidGroupBinary(id);
|
|
692
692
|
|
|
693
693
|
if (isGroup) {
|
|
694
694
|
try {
|
|
@@ -792,7 +792,7 @@ class ClutchHandler {
|
|
|
792
792
|
for (const id of jids) {
|
|
793
793
|
try {
|
|
794
794
|
const normalizedId = jidNormalizedUserBinary(id);
|
|
795
|
-
const isPrivate =
|
|
795
|
+
const isPrivate = !isJidGroupBinary(normalizedId);
|
|
796
796
|
const type = isPrivate ? 'statusMentionMessage' : 'groupStatusMentionMessage';
|
|
797
797
|
|
|
798
798
|
const protocolMessage = {
|