Skip to content

Commit

Permalink
fix(basic.gblib): #286 fix token replaacement.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Mar 9, 2023
1 parent de77227 commit 0e9c2e9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/whatsapp.gblib/services/WhatsappDirectLine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ export class WhatsappDirectLine extends GBService {
if (q.content === e1 && !found) {
const answer = this.min.kbService['getAnswerById'](this.min.instance.instanceId, q.answerId);
answerText = answer.content;

answerText = answerText.replace(/\$username/, fromName);
}
});
}
Expand Down Expand Up @@ -615,10 +617,13 @@ export class WhatsappDirectLine extends GBService {
mobile: from,
group: group,
attachments: attachments,

// Use from container to transport information to GBMinService.receiver.

from: {
id: from,
channelIdEx: 'whatsapp',
name: fromName,
channelIdEx: 'whatsapp',
group: group
},
replyToId: from
Expand Down

0 comments on commit 0e9c2e9

Please sign in to comment.