Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

fix(baileys): advertise channels, status updates and catalog

Yudhi Armyndharis1b2681f4fd85
diff --git a/src/engine/builtin/baileys/index.spec.ts b/src/engine/builtin/baileys/index.spec.ts
index f4c6bd450..ea0b6dd36 100644
--- a/src/engine/builtin/baileys/index.spec.ts
+++ b/src/engine/builtin/baileys/index.spec.ts
@@ -38,7 +38,7 @@ describe('BaileysPlugin.createEngine (opaque config)', () => {
);
});
- it('advertises the slice-3b supported feature set', () => {
+ it('advertises the supported feature set', () => {
expect(new BaileysPlugin().getFeatures()).toEqual([
'text-messages',
'typing-indicator',
@@ -51,6 +51,9 @@ describe('BaileysPlugin.createEngine (opaque config)', () => {
'message-deletion',
'group-management',
'read-receipts',
+ 'channels',
+ 'status-updates',
+ 'catalog',
]);
});
diff --git a/src/engine/builtin/baileys/index.ts b/src/engine/builtin/baileys/index.ts
index cd48e23eb..4f1af2ac3 100644
--- a/src/engine/builtin/baileys/index.ts
+++ b/src/engine/builtin/baileys/index.ts
@@ -77,6 +77,11 @@ export class BaileysPlugin implements IEnginePlugin {
'message-deletion',
'group-management',
'read-receipts',
+ 'channels',
+ 'status-updates',
+ 'catalog',
+ // No 'labels': Baileys can create, delete and attach labels but has no query for them, so the
+ // label and chat-label reads 501 and a client could not read back what it wrote.
];
}
diff --git a/src/modules/infra/dto/infra-response.dto.ts b/src/modules/infra/dto/infra-response.dto.ts
index 05432a197..859aa8e46 100644
--- a/src/modules/infra/dto/infra-response.dto.ts
+++ b/src/modules/infra/dto/infra-response.dto.ts
@@ -184,7 +184,8 @@ export class AvailableEngineDto {
@ApiPropertyOptional({
type: EngineLibraryDto,
- description: 'Absent when the plugin does not report a library, which includes any disabled engine.',
+ description:
+ 'Absent when the plugin does not report a library. Built-in engines report it whether or not they are enabled.',
})
library?: EngineLibraryDto;
}