modules/0-ui
This commit is contained in:
11
src/modules/0-ui/handlers/messages.js
Normal file
11
src/modules/0-ui/handlers/messages.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import { listMessages } from "../../2-identity/db/repo.js";
|
||||
|
||||
export async function handleListMessages({ tenantId, chat_id, limit = "200" }) {
|
||||
if (!chat_id) return [];
|
||||
return listMessages({
|
||||
tenant_id: tenantId,
|
||||
wa_chat_id: String(chat_id),
|
||||
limit: parseInt(limit, 10) || 200,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user