mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-10 18:39:38 -06:00
chore: bump version to 2.3.3 in package-lock.json and update remoteJid handling in Baileys service
Some checks are pending
Build Docker image / Build and Deploy (push) Waiting to run
Some checks are pending
Build Docker image / Build and Deploy (push) Waiting to run
This commit is contained in:
parent
e864b18561
commit
8830f476e8
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "evolution-api",
|
"name": "evolution-api",
|
||||||
"version": "2.3.2",
|
"version": "2.3.3",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "evolution-api",
|
"name": "evolution-api",
|
||||||
"version": "2.3.2",
|
"version": "2.3.3",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@adiwajshing/keyed-db": "^0.2.4",
|
"@adiwajshing/keyed-db": "^0.2.4",
|
||||||
|
|||||||
@ -110,7 +110,7 @@ import makeWASocket, {
|
|||||||
isJidBroadcast,
|
isJidBroadcast,
|
||||||
isJidGroup,
|
isJidGroup,
|
||||||
isJidNewsletter,
|
isJidNewsletter,
|
||||||
isJidUser,
|
isPnUser,
|
||||||
makeCacheableSignalKeyStore,
|
makeCacheableSignalKeyStore,
|
||||||
MessageUpsertType,
|
MessageUpsertType,
|
||||||
MessageUserReceiptUpdate,
|
MessageUserReceiptUpdate,
|
||||||
@ -982,8 +982,8 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m.key.remoteJid?.includes('@lid') && m.key.senderPn) {
|
if (m.key.remoteJid?.includes('@lid') && m.key.remoteJidAlt) {
|
||||||
m.key.remoteJid = m.key.senderPn;
|
m.key.remoteJid = m.key.remoteJidAlt;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Long.isLong(m?.messageTimestamp)) {
|
if (Long.isLong(m?.messageTimestamp)) {
|
||||||
@ -1048,9 +1048,9 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
for (const received of messages) {
|
for (const received of messages) {
|
||||||
if (received.key.remoteJid?.includes('@lid') && received.key.senderPn) {
|
if (received.key.remoteJid?.includes('@lid') && received.key.remoteJidAlt) {
|
||||||
(received.key as { previousRemoteJid?: string | null }).previousRemoteJid = received.key.remoteJid;
|
(received.key as { previousRemoteJid?: string | null }).previousRemoteJid = received.key.remoteJid;
|
||||||
received.key.remoteJid = received.key.senderPn;
|
received.key.remoteJid = received.key.remoteJidAlt;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
received?.messageStubParameters?.some?.((param) =>
|
received?.messageStubParameters?.some?.((param) =>
|
||||||
@ -1407,8 +1407,8 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key.remoteJid?.includes('@lid') && key.senderPn) {
|
if (key.remoteJid?.includes('@lid') && key.remoteJidAlt) {
|
||||||
key.remoteJid = key.senderPn;
|
key.remoteJid = key.remoteJidAlt;
|
||||||
}
|
}
|
||||||
|
|
||||||
const updateKey = `${this.instance.id}_${key.id}_${update.status}`;
|
const updateKey = `${this.instance.id}_${key.id}_${update.status}`;
|
||||||
@ -1910,7 +1910,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
quoted,
|
quoted,
|
||||||
});
|
});
|
||||||
const id = await this.client.relayMessage(sender, message, { messageId });
|
const id = await this.client.relayMessage(sender, message, { messageId });
|
||||||
m.key = { id: id, remoteJid: sender, participant: isJidUser(sender) ? sender : undefined, fromMe: true };
|
m.key = { id: id, remoteJid: sender, participant: isPnUser(sender) ? sender : undefined, fromMe: true };
|
||||||
for (const [key, value] of Object.entries(m)) {
|
for (const [key, value] of Object.entries(m)) {
|
||||||
if (!value || (isArray(value) && value.length) === 0) {
|
if (!value || (isArray(value) && value.length) === 0) {
|
||||||
delete m[key];
|
delete m[key];
|
||||||
@ -3367,7 +3367,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
try {
|
try {
|
||||||
const keys: proto.IMessageKey[] = [];
|
const keys: proto.IMessageKey[] = [];
|
||||||
data.readMessages.forEach((read) => {
|
data.readMessages.forEach((read) => {
|
||||||
if (isJidGroup(read.remoteJid) || isJidUser(read.remoteJid)) {
|
if (isJidGroup(read.remoteJid) || isPnUser(read.remoteJid)) {
|
||||||
keys.push({ remoteJid: read.remoteJid, fromMe: read.fromMe, id: read.id });
|
keys.push({ remoteJid: read.remoteJid, fromMe: read.fromMe, id: read.id });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -153,7 +153,7 @@ export default async function useMultiFileAuthStatePrisma(
|
|||||||
ids.map(async (id) => {
|
ids.map(async (id) => {
|
||||||
let value = await readData(`${type}-${id}`);
|
let value = await readData(`${type}-${id}`);
|
||||||
if (type === 'app-state-sync-key' && value) {
|
if (type === 'app-state-sync-key' && value) {
|
||||||
value = proto.Message.AppStateSyncKeyData.fromObject(value);
|
value = proto.Message.AppStateSyncKeyData.create(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
data[id] = value;
|
data[id] = value;
|
||||||
|
|||||||
@ -100,7 +100,7 @@ export class AuthStateProvider {
|
|||||||
ids.map(async (id) => {
|
ids.map(async (id) => {
|
||||||
let value = await readData(`${type}-${id}`);
|
let value = await readData(`${type}-${id}`);
|
||||||
if (type === 'app-state-sync-key' && value) {
|
if (type === 'app-state-sync-key' && value) {
|
||||||
value = proto.Message.AppStateSyncKeyData.fromObject(value);
|
value = proto.Message.AppStateSyncKeyData.create(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
data[id] = value;
|
data[id] = value;
|
||||||
|
|||||||
@ -50,7 +50,7 @@ export async function useMultiFileAuthStateRedisDb(
|
|||||||
ids.map(async (id) => {
|
ids.map(async (id) => {
|
||||||
let value = await readData(`${type}-${id}`);
|
let value = await readData(`${type}-${id}`);
|
||||||
if (type === 'app-state-sync-key' && value) {
|
if (type === 'app-state-sync-key' && value) {
|
||||||
value = proto.Message.AppStateSyncKeyData.fromObject(value);
|
value = proto.Message.AppStateSyncKeyData.create(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
data[id] = value;
|
data[id] = value;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user