bug sending messages to buyers fixed
This commit is contained in:
parent
bb039386f2
commit
9abaa8ce51
|
@ -73,7 +73,7 @@ module.exports = Self => {
|
|||
await sendMessage(ctx, {
|
||||
itemFk: sale.itemFk,
|
||||
ticketFk: sale.ticketFk,
|
||||
workerFk: sale.item().itemType().workerFk,
|
||||
recipientFk: sale.item().itemType().worker().userFk,
|
||||
quantity: sale.quantity,
|
||||
concept: sale.concept,
|
||||
nickname: address.nickname
|
||||
|
@ -107,7 +107,16 @@ module.exports = Self => {
|
|||
fields: ['typeFk'],
|
||||
include: {
|
||||
relation: 'itemType',
|
||||
scope: {fields: ['workerFk']}
|
||||
scope: {
|
||||
fields: ['workerFk'],
|
||||
include: {
|
||||
relation: 'worker',
|
||||
scope: {
|
||||
fields: ['id', 'userFk'],
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}],
|
||||
|
@ -152,7 +161,7 @@ module.exports = Self => {
|
|||
+ `"${params.nickname}" provenientes del ticket #${params.ticketFk}`;
|
||||
|
||||
await Self.app.models.Message.send(ctx, {
|
||||
recipientFk: params.workerFk,
|
||||
recipientFk: params.recipientFk,
|
||||
message: message
|
||||
}, {transaction: transaction});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue