change receiver to requesterId
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
d94e2900d0
commit
f60fa5a852
|
@ -50,19 +50,16 @@ module.exports = Self => {
|
|||
const request = await Self.app.models.TicketRequest.findById(ctx.args.id, null, myOptions);
|
||||
await request.updateAttributes(params, myOptions);
|
||||
|
||||
// const salesPerson = ticket.client().salesPersonUser();
|
||||
// if (salesPerson) {
|
||||
// const origin = ctx.req.headers.origin;
|
||||
const origin = ctx.req.headers.origin;
|
||||
const requesterId = request.requesterFk;
|
||||
|
||||
const message = $t('Deny buy request', {
|
||||
ticketId: request.ticketFk,
|
||||
url: `${origin}/#!/ticket/${request.ticketFk}/request/index`,
|
||||
observation: params.response
|
||||
});
|
||||
// await models.Chat.sendCheckingPresence(ctx, salesPerson.id, message, myOptions);
|
||||
await models.Chat.send(ctx, '@vicent', message, myOptions);
|
||||
// }
|
||||
|
||||
await models.Chat.sendCheckingPresence(ctx, requesterId, message, myOptions);
|
||||
|
||||
if (tx) await tx.commit();
|
||||
|
||||
|
|
Loading…
Reference in New Issue