mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Ensure @s.whatsapp.net for message-update
This commit is contained in:
@@ -141,7 +141,7 @@ export class WAConnection extends Base {
|
|||||||
if (json.type === 'error') {
|
if (json.type === 'error') {
|
||||||
const update: WAMessageStatusUpdate = {
|
const update: WAMessageStatusUpdate = {
|
||||||
from: this.user.jid,
|
from: this.user.jid,
|
||||||
to: json.jid,
|
to: whatsappID(json.jid),
|
||||||
participant: this.user.jid,
|
participant: this.user.jid,
|
||||||
timestamp: new Date(),
|
timestamp: new Date(),
|
||||||
ids: [ json.index ],
|
ids: [ json.index ],
|
||||||
@@ -158,9 +158,9 @@ export class WAConnection extends Base {
|
|||||||
if (json.cmd === 'ack') ids = [json.id]
|
if (json.cmd === 'ack') ids = [json.id]
|
||||||
|
|
||||||
const update: WAMessageStatusUpdate = {
|
const update: WAMessageStatusUpdate = {
|
||||||
from: json.from,
|
from: whatsappID(json.from),
|
||||||
to: json.to,
|
to: whatsappID(json.to),
|
||||||
participant: json.participant,
|
participant: whatsappID(json.participant),
|
||||||
timestamp: new Date(json.t * 1000),
|
timestamp: new Date(json.t * 1000),
|
||||||
ids: ids,
|
ids: ids,
|
||||||
type: (+json.ack)+1,
|
type: (+json.ack)+1,
|
||||||
|
|||||||
Reference in New Issue
Block a user