Send message to comercial by RocketChat #1897

Merged
jsegarra merged 10 commits from 5499_claim_rocketMessage_comercial into dev 2024-01-11 07:00:13 +00:00
1 changed files with 3 additions and 3 deletions
Showing only changes of commit b76e269e73 - Show all commits

View File

@ -110,7 +110,7 @@ module.exports = Self => {
} }
}; };
async function notifyStateChange(ctx, id, claim, state) { async function notifyStateChange(ctx, workerId, claim, newState) {
const models = Self.app.models; const models = Self.app.models;
const url = await models.Url.getUrl(); const url = await models.Url.getUrl();
const $t = ctx.req.__; // $translate const $t = ctx.req.__; // $translate
@ -119,9 +119,9 @@ module.exports = Self => {
claimId: claim.id, claimId: claim.id,
clientName: claim.client().name, clientName: claim.client().name,
claimUrl: `${url}claim/${claim.id}/summary`, claimUrl: `${url}claim/${claim.id}/summary`,
newState: state newState
}); });
await models.Chat.sendCheckingPresence(ctx, id, message); await models.Chat.sendCheckingPresence(ctx, workerId, message);
} }
async function notifyPickUp(ctx, workerId, claim) { async function notifyPickUp(ctx, workerId, claim) {