From 17303039b8845ca038f9ddfee74dc358d4bf7b63 Mon Sep 17 00:00:00 2001 From: devlikepro Date: Wed, 8 Jan 2025 11:34:20 +0700 Subject: [PATCH] [core] NOWEB subscribe presence --- src/core/abc/session.abc.ts | 2 +- src/core/engines/noweb/session.noweb.core.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/abc/session.abc.ts b/src/core/abc/session.abc.ts index ccc9b2ef..b50548f3 100644 --- a/src/core/abc/session.abc.ts +++ b/src/core/abc/session.abc.ts @@ -651,7 +651,7 @@ export abstract class WhatsappSession { throw new NotImplementedByEngineError(); } - public subscribePresence(id: string): Promise { + public subscribePresence(id: string): Promise { throw new NotImplementedByEngineError(); } diff --git a/src/core/engines/noweb/session.noweb.core.ts b/src/core/engines/noweb/session.noweb.core.ts index 7ca29999..fe5d8550 100644 --- a/src/core/engines/noweb/session.noweb.core.ts +++ b/src/core/engines/noweb/session.noweb.core.ts @@ -1243,6 +1243,11 @@ export class WhatsappSessionNoWebCore extends WhatsappSession { return this.toWahaPresences(remoteJid, result); } + public subscribePresence(id: string): Promise { + const jid = toJID(id); + return this.sock.presenceSubscribe(jid); + } + /** * Status methods */