Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(message): describe author as the sender of list and status posts

Yudhi Armyndharisd25ba8ac9c07
diff --git a/docs/05-database-design.md b/docs/05-database-design.md
index 9b239b974..5fb8ebd05 100644
--- a/docs/05-database-design.md
+++ b/docs/05-database-design.md
@@ -489,7 +489,7 @@ CREATE TABLE messages (
"waMessageId" VARCHAR, -- nullable; transient outgoing rows have none yet
"chatId" VARCHAR NOT NULL,
"chatName" VARCHAR, -- nullable; inbound sender pushName (the member, in a group)
- author VARCHAR, -- nullable; participant JID for a group message ("from" is the group)
+ author VARCHAR, -- nullable; sender JID for a group, status or broadcast-list message
"from" VARCHAR NOT NULL,
"to" VARCHAR NOT NULL,
body TEXT,
diff --git a/openapi.json b/openapi.json
index 367bb83ad..724140ce3 100644
--- a/openapi.json
+++ b/openapi.json
@@ -11637,7 +11637,7 @@
"author": {
"type": "string",
"nullable": true,
- "description": "Group participant who posted the message (`from` is the group JID there).",
+ "description": "Sender of a group, status or broadcast-list message (`from` is the group or `@broadcast` id there).",
"example": "[email protected]"
},
"from": {
@@ -12658,7 +12658,7 @@
},
"author": {
"type": "string",
- "description": "Group participant who actually sent it (`from` is the group JID there).",
+ "description": "Sender of a group, status or broadcast-list message (`from` is the group or `@broadcast` id there).",
"example": "[email protected]"
},
"mentionedIds": {
diff --git a/src/engine/interfaces/whatsapp-engine.interface.ts b/src/engine/interfaces/whatsapp-engine.interface.ts
index 1e7288cf7..18f8ec37b 100644
--- a/src/engine/interfaces/whatsapp-engine.interface.ts
+++ b/src/engine/interfaces/whatsapp-engine.interface.ts
@@ -114,7 +114,7 @@ export interface IncomingMessage {
* in the raw payload. 0 or undefined = no disappearing timer.
* Known values: 86400 (24h), 604800 (7d), 7776000 (90d). */
ephemeralDuration?: number;
- /** For group messages, the WID of the participant who actually sent it (`from` is the group JID there). */
+ /** For group, status and broadcast-list messages, the WID of the sender (`from` is the group or `@broadcast` id). */
author?: string;
/** WIDs @mentioned in the message (empty/absent when none). Surfaced for command targeting. */
mentionedIds?: string[];
diff --git a/src/modules/message/dto/message-responses.dto.ts b/src/modules/message/dto/message-responses.dto.ts
index 6ff557b78..b29efb3da 100644
--- a/src/modules/message/dto/message-responses.dto.ts
+++ b/src/modules/message/dto/message-responses.dto.ts
@@ -65,7 +65,7 @@ export class MessageListItemDto {
@ApiPropertyOptional({
type: String,
nullable: true,
- description: 'Group participant who posted the message (`from` is the group JID there).',
+ description: 'Sender of a group, status or broadcast-list message (`from` is the group or `@broadcast` id there).',
example: '[email protected]',
})
author?: string | null;
@@ -286,7 +286,7 @@ export class ChatHistoryMessageDto {
ephemeralDuration?: number;
@ApiPropertyOptional({
- description: 'Group participant who actually sent it (`from` is the group JID there).',
+ description: 'Sender of a group, status or broadcast-list message (`from` is the group or `@broadcast` id there).',
example: '[email protected]',
})
author?: string;
diff --git a/src/modules/message/entities/message.entity.ts b/src/modules/message/entities/message.entity.ts
index 1f2773b29..6ced33c7d 100644
--- a/src/modules/message/entities/message.entity.ts
+++ b/src/modules/message/entities/message.entity.ts
@@ -58,9 +58,9 @@ export class Message {
chatName?: string;
/**
- * Stable sender identity for a group message: the participant JID who actually posted (`from` is
- * the group JID). Lets the chat view tell two same-named participants apart. Null on 1:1
- * messages, outgoing echoes, and legacy rows.
+ * Stable sender identity for a group, status or broadcast-list message: the JID who actually
+ * posted (`from` is the group or `@broadcast` id). Lets the chat view tell two same-named
+ * participants apart. Null on 1:1 messages, outgoing echoes, and legacy rows.
*/
@Column({ nullable: true })
author?: string;