mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-22 20:12:02 -06:00
wip
This commit is contained in:
parent
68402393b5
commit
9bdbfc6f4f
@ -104,11 +104,11 @@ export abstract class RouterBroker {
|
||||
const instance = request.params as unknown as InstanceDto;
|
||||
const body = request.body;
|
||||
|
||||
if (!body?.groupJid) {
|
||||
if (request.query.groupJid) {
|
||||
Object.assign(body, {
|
||||
groupJid: request.query.groupJid
|
||||
});
|
||||
let groupJid = body?.groupJid;
|
||||
|
||||
if (!groupJid) {
|
||||
if (request.query?.groupJid) {
|
||||
groupJid = request.query.groupJid;
|
||||
} else {
|
||||
throw new BadRequestException(
|
||||
'The group id needs to be informed in the query',
|
||||
@ -117,6 +117,14 @@ export abstract class RouterBroker {
|
||||
}
|
||||
}
|
||||
|
||||
if (!groupJid.endsWith('@g.us')) {
|
||||
groupJid = groupJid + '@g.us';
|
||||
}
|
||||
|
||||
Object.assign(body, {
|
||||
groupJid: groupJid
|
||||
});
|
||||
|
||||
const ref = new ClassRef();
|
||||
|
||||
Object.assign(ref, body);
|
||||
|
Loading…
Reference in New Issue
Block a user