Compare commits

..
6 Commits
Author SHA1 Message Date
devlikepro ef36e4d3ac [core] 2025.5.3
Release / WEBJS - chrome - amd64 - chrome (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
Release / NOWEB - none - linux/arm64 - noweb-arm (push) Waiting to run
2025-05-16 18:33:10 +07:00
devlikepro ba2ddd62ad [core] NOWEB - fix poll.vote event
fix #960
2025-05-16 18:33:10 +07:00
devlikepro 6a03e1488c [core] 2025.5.2
Release / WEBJS - chrome - amd64 - chrome (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
Release / NOWEB - none - linux/arm64 - noweb-arm (push) Waiting to run
2025-05-16 17:42:09 +07:00
devlikepro cabd2ed562 [core] GOWS - pairing with official account
fix #864
2025-05-16 17:42:09 +07:00
devlikepro 4a9296276d [core] NOWEB - fix pairing code issue
fix #961
2025-05-16 17:42:09 +07:00
devlikepro 1fd84d824c [core] senderKeyDistributionMessage - ignore undefined messages 2025-05-16 17:42:08 +07:00
5 changed files with 69 additions and 6 deletions

No files matched your search

+1 -1
View File
@@ -1409,7 +1409,7 @@ export class WhatsappSessionGoWSCore extends WhatsappSession {
const hasSomeContent = !!getContentType(normalizedContent);
if (!hasSomeContent) {
// Ignore key distribution messages
if (message.message.senderKeyDistributionMessage) return;
if (message?.Message?.senderKeyDistributionMessage) return;
}
if (downloadMedia) {
+64 -1
View File
@@ -2,6 +2,7 @@ import makeWASocket, {
Browsers,
Chat,
Contact,
decryptPollVote,
DisconnectReason,
downloadMediaMessage,
extractMessageContent,
@@ -397,6 +398,7 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
this.sock = await this.makeSocket();
this.issueMessageUpdateOnEdits();
this.issueMessageUpdateOnPoll();
this.fixMessageUpsertStatus();
this.issuePresenceUpdateOnMessageUpsert();
if (this.isDebugEnabled()) {
@@ -604,6 +606,67 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
});
}
private issueMessageUpdateOnPoll() {
// Fix for https://github.com/devlikeapro/waha/issues/960
this.sock.ev.on('messages.upsert', async ({ messages }) => {
const meId = this.getSessionMeInfo().id;
if (!meId) {
return;
}
for (const message of messages) {
const content = normalizeMessageContent(message.message);
if (!content.pollUpdateMessage) {
continue;
}
const creationMsgKey = content.pollUpdateMessage.pollCreationMessageKey;
// we need to fetch the poll creation message to get the poll enc key
const pollMsg = await this.getMessage(creationMsgKey);
if (!pollMsg) {
this.logger.warn(
{ creationMsgKey },
'poll creation message not found, cannot decrypt update',
);
continue;
}
const meIdNormalised = jidNormalizedUser(meId);
const pollCreatorJid = getKeyAuthor(creationMsgKey, meIdNormalised);
const voterJid = getKeyAuthor(message.key, meIdNormalised);
const pollEncKey = pollMsg.messageContextInfo?.messageSecret;
try {
const voteMsg = decryptPollVote(content.pollUpdateMessage.vote, {
pollEncKey,
pollCreatorJid,
pollMsgId: creationMsgKey.id,
voterJid,
});
this.sock.ev.emit('messages.update', [
{
key: creationMsgKey,
update: {
pollUpdates: [
{
pollUpdateMessageKey: message.key,
vote: voteMsg,
senderTimestampMs: (
content.pollUpdateMessage.senderTimestampMs as Long
).toNumber(),
},
],
},
},
]);
} catch (err) {
this.logger.warn(
{ err, creationMsgKey },
'failed to decrypt poll vote',
);
}
}
});
}
private issuePresenceUpdateOnMessageUpsert() {
//
// Fix for "typing" after sending a message
@@ -2002,7 +2065,7 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
const hasSomeContent = !!getContentType(normalizedContent);
if (!hasSomeContent) {
// Ignore key distribution messages
if (message.message.senderKeyDistributionMessage) return;
if (message?.message?.senderKeyDistributionMessage) return;
}
if (downloadMedia) {
+1 -1
View File
@@ -33,7 +33,7 @@ export function getEngineName(): string {
}
export const VERSION: WAHAEnvironment = {
version: '2025.5.1',
version: '2025.5.3',
engine: getEngineName(),
tier: getWAHAVersion(),
browser:
+1 -1
View File
@@ -2,7 +2,7 @@
"waha": {
"gows": {
"repo": "devlikeapro/gows",
"ref": "v1.0.4"
"ref": "v1.0.5"
},
"dashboard": {
"repo": "devlikeapro/dashboard",
+2 -2
View File
@@ -7,7 +7,7 @@ __metadata:
"@adiwajshing/baileys@github:devlikeapro/Baileys#fork-master-2025-05-01":
version: 6.7.16
resolution: "@adiwajshing/baileys@https://github.com/devlikeapro/Baileys.git#commit=3cdc44f0fb97bb1c50b6e518862b763211f6b739"
resolution: "@adiwajshing/baileys@https://github.com/devlikeapro/Baileys.git#commit=94466bd31f85afd07b111dcd895b634e09130bda"
dependencies:
"@cacheable/node-cache": ^1.4.0
"@hapi/boom": ^9.1.3
@@ -34,7 +34,7 @@ __metadata:
optional: true
sharp:
optional: true
checksum: 7e9e4622b26a020428b678543ba4e59a35f679e8f00dd975eb20e7acd6afc6c465c107091a590ae7245fc3f29940611ac6f2b80fcd173fde742926887c41b563
checksum: be827af019579bfb7b01745ff743f9875d602ccda3e2f18a54a0dd245981e8afa6aff419c55c21465a263cefe58b442f524fa2ba4c800d857ad4317c86800ae2
languageName: node
linkType: hard