Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "whaileys",
"version": "6.4.10",
"version": "6.4.11",
"description": "WhatsApp API",
"homepage": "https://github.com/canove/whaileys",
"main": "lib/index.js",
Expand Down
10 changes: 6 additions & 4 deletions src/Socket/chats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -773,21 +773,23 @@ export const makeChatsSocket = (config: SocketConfig) => {
}
};

/** sending non-abt props may fix QR scan fail if server expects */
/** fetch AB props */
const fetchProps = async () => {
const resultNode = await query({
tag: "iq",
attrs: {
to: S_WHATSAPP_NET,
xmlns: "w",
xmlns: "abt",
type: "get"
},
content: [
{
tag: "props",
attrs: {
protocol: "2",
hash: authState?.creds?.lastPropHash || ""
protocol: "1",
...(authState?.creds?.lastPropHash
? { hash: authState.creds.lastPropHash }
: {})
}
}
]
Expand Down
2 changes: 2 additions & 0 deletions src/Socket/messages-recv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
const status = getCallStatusFromNode(infoChild);
const call: WACallEvent = {
chatId: attrs.from,
callerPn: infoChild.attrs["caller_pn"],
from,
id: callId,
date: new Date(+attrs.t * 1000),
Expand All @@ -913,6 +914,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
if (callOfferData[call.id]) {
call.isVideo = callOfferData[call.id].isVideo;
call.isGroup = callOfferData[call.id].isGroup;
call.callerPn = call.callerPn || callOfferData[call.id].callerPn;
}

// delete data once call has ended
Expand Down
1 change: 1 addition & 0 deletions src/Types/Call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export type WACallUpdateType =
export type WACallEvent = {
chatId: string;
from: string;
callerPn?: string;
isGroup?: boolean;
id: string;
date: Date;
Expand Down
1 change: 1 addition & 0 deletions src/Utils/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@ export const normalizeMessageContent = (
content?.documentWithCaptionMessage?.message ||
content?.ephemeralMessage?.message?.viewOnceMessage?.message ||
content?.ephemeralMessage?.message ||
content?.associatedChildMessage?.message ||
content?.viewOnceMessage?.message ||
content?.viewOnceMessageV2Extension?.message ||
content?.viewOnceMessageV2?.message ||
Expand Down
Loading