Compare commits

..
6 Commits
Author SHA1 Message Date
devlikepro e210d1e9fc [core] 2025.3.3
Release / WEBJS - chrome - amd64 - chrome (push) Waiting to run
Release / NOWEB - none - linux/arm64 - noweb-arm (push) Waiting to run
Release / WEBJS - chromium - amd64 - latest (push) Waiting to run
Release / WEBJS - chromium - linux/arm64 - arm (push) Waiting to run
Release / GOWS - none - amd64 - gows (push) Waiting to run
Release / GOWS - none - linux/arm64 - gows-arm (push) Waiting to run
Release / NOWEB - none - amd64 - noweb (push) Waiting to run
2025-03-31 15:39:56 +07:00
devlikepro df0f449e13 [core] use isJidBroadcast 2025-03-31 15:39:56 +07:00
devlikepro 895105c900 [core] Ignore @broadcast for picture
fix #878
fix #881
2025-03-31 15:39:56 +07:00
devlikepro 209538709b [core] Up Dashboard 2025-03-31 15:39:56 +07:00
devlikepro ef7c35286b [core] NOWEB - revert presence optimizations 2025-03-31 15:39:56 +07:00
devlikepro 70af0828cb [core] NOWEB - cache presence for 1 minute 2025-03-31 15:39:56 +07:00
8 changed files with 21 additions and 21 deletions

No files matched your search

+4 -1
View File
@@ -1,3 +1,4 @@
import { isJidBroadcast } from '@adiwajshing/baileys/lib/WABinary/jid-utils';
import {
Channel,
ChannelListResult,
@@ -597,7 +598,9 @@ export abstract class WhatsappSession {
protected async refreshProfilePicture(id: string) {
let fn: Promise<string>;
if (isNewsletter(id)) {
if (isJidBroadcast(id)) {
return null;
} else if (isNewsletter(id)) {
fn = this.channelsGetChannel(id).then(
(channel: Channel) => channel.picture || channel.preview,
);
+2 -2
View File
@@ -2,7 +2,6 @@ import {
getContentType,
getUrlFromDirectPath,
isJidGroup,
isJidStatusBroadcast,
jidNormalizedUser,
} from '@adiwajshing/baileys';
import * as grpc from '@grpc/grpc-js';
@@ -130,6 +129,7 @@ import { promisify } from 'util';
import * as gows from './types';
import MessageServiceClient = messages.MessageServiceClient;
import { isJidBroadcast } from '@adiwajshing/baileys/lib/WABinary/jid-utils';
import { ReplyToMessage } from '@waha/structures/message.dto';
enum WhatsMeowEvent {
@@ -646,7 +646,7 @@ export class WhatsappSessionGoWSCore extends WhatsappSession {
const id = buildMessageId({
ID: data.id,
IsFromMe: true,
IsGroup: isJidGroup(jid) || isJidStatusBroadcast(jid),
IsGroup: isJidGroup(jid) || isJidBroadcast(jid),
Chat: jid,
Sender: this.me.id,
});
+2 -1
View File
@@ -7,7 +7,8 @@ export class PresenceProxy {
constructor() {
this.cache = new NodeCache({
stdTTL: 60 * 60, // 1 hour
stdTTL: 60, // 1 minute
checkperiod: 60, // 1 minute
useClones: false,
});
+9 -11
View File
@@ -10,8 +10,6 @@ import makeWASocket, {
getContentType,
getKeyAuthor,
isJidGroup,
isJidNewsletter,
isJidStatusBroadcast,
isJidUser,
isRealMessage,
jidNormalizedUser,
@@ -38,7 +36,10 @@ import {
LabelAssociationType,
} from '@adiwajshing/baileys/lib/Types/LabelAssociation';
import { MessageUserReceiptUpdate } from '@adiwajshing/baileys/lib/Types/Message';
import { isLidUser } from '@adiwajshing/baileys/lib/WABinary/jid-utils';
import {
isJidBroadcast,
isLidUser,
} from '@adiwajshing/baileys/lib/WABinary/jid-utils';
import { Logger as BaileysLogger } from '@adiwajshing/baileys/node_modules/pino';
import { UnprocessableEntityException } from '@nestjs/common';
import {
@@ -1196,12 +1197,6 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
public async fetchContactProfilePicture(id: string) {
const contact = this.ensureSuffix(id);
if (isJidNewsletter(id)) {
return null;
}
if (isJidStatusBroadcast(id)) {
return null;
}
try {
const url = await this.sock.profilePictureUrl(contact, 'image');
return url;
@@ -2335,7 +2330,7 @@ export function toCusFormat(remoteJid) {
if (isJidGroup(remoteJid)) {
return remoteJid;
}
if (isJidStatusBroadcast(remoteJid)) {
if (isJidBroadcast(remoteJid)) {
return remoteJid;
}
if (isLidUser(remoteJid)) {
@@ -2366,12 +2361,15 @@ export function toJID(chatId) {
if (isJidGroup(chatId)) {
return chatId;
}
if (isJidStatusBroadcast(chatId)) {
if (isJidBroadcast(chatId)) {
return chatId;
}
if (isNewsletter(chatId)) {
return chatId;
}
if (isLidUser(chatId)) {
return chatId;
}
const number = chatId.split('@')[0];
return number + '@s.whatsapp.net';
}
@@ -7,7 +7,6 @@ import makeWASocket, {
} from '@adiwajshing/baileys';
import { Label } from '@adiwajshing/baileys/lib/Types/Label';
import { BadRequestException } from '@nestjs/common';
import { PresenceProxy } from '@waha/core/engines/noweb/PresenceProxy';
import { GetChatMessagesFilter } from '@waha/structures/chats.dto';
import { PaginationParams } from '@waha/structures/pagination.dto';
import { PaginatorInMemory } from '@waha/utils/Paginator';
@@ -27,7 +26,7 @@ export class NowebInMemoryStore implements INowebStore {
constructor() {
this.store = makeInMemoryStore({ logger: logger });
const presences = new PresenceProxy().proxy;
const presences = {};
this.store.presences = presences;
// Adjust inline even handler
this.store.setPresences(presences);
@@ -18,7 +18,6 @@ import {
LabelAssociation,
LabelAssociationType,
} from '@adiwajshing/baileys/lib/Types/LabelAssociation';
import { PresenceProxy } from '@waha/core/engines/noweb/PresenceProxy';
import { IGroupRepository } from '@waha/core/engines/noweb/store/IGroupRepository';
import { ILabelAssociationRepository } from '@waha/core/engines/noweb/store/ILabelAssociationsRepository';
import { ILabelsRepository } from '@waha/core/engines/noweb/store/ILabelsRepository';
@@ -72,7 +71,7 @@ export class NowebPersistentStore implements INowebStore {
this.messagesRepo = storage.getMessagesRepository();
this.labelsRepo = storage.getLabelsRepository();
this.labelAssociationsRepo = storage.getLabelAssociationRepository();
this.presences = new PresenceProxy().proxy;
this.presences = {};
this.lock = new AsyncLock({ maxPending: Infinity });
}
+1 -1
View File
@@ -33,7 +33,7 @@ export function getEngineName(): string {
}
export const VERSION: WAHAEnvironment = {
version: '2025.3.2',
version: '2025.3.3',
engine: getEngineName(),
tier: getWAHAVersion(),
browser:
+1 -1
View File
@@ -6,7 +6,7 @@
},
"dashboard": {
"repo": "devlikeapro/dashboard",
"ref": "4dd30223fb0c5bb9bd8f168d0ff47633aa4a3047"
"ref": "0e7e2e7edc715b0c30fff89c10ee2d2fc3402d2d"
}
}
}