fix(basic.gblib): #286 fix token replaacement.
This commit is contained in:
parent
de77227945
commit
0e9c2e9ebf
1 changed files with 6 additions and 1 deletions
|
@ -402,6 +402,8 @@ export class WhatsappDirectLine extends GBService {
|
||||||
if (q.content === e1 && !found) {
|
if (q.content === e1 && !found) {
|
||||||
const answer = this.min.kbService['getAnswerById'](this.min.instance.instanceId, q.answerId);
|
const answer = this.min.kbService['getAnswerById'](this.min.instance.instanceId, q.answerId);
|
||||||
answerText = answer.content;
|
answerText = answer.content;
|
||||||
|
|
||||||
|
answerText = answerText.replace(/\$username/, fromName);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -615,10 +617,13 @@ export class WhatsappDirectLine extends GBService {
|
||||||
mobile: from,
|
mobile: from,
|
||||||
group: group,
|
group: group,
|
||||||
attachments: attachments,
|
attachments: attachments,
|
||||||
|
|
||||||
|
// Use from container to transport information to GBMinService.receiver.
|
||||||
|
|
||||||
from: {
|
from: {
|
||||||
id: from,
|
id: from,
|
||||||
channelIdEx: 'whatsapp',
|
|
||||||
name: fromName,
|
name: fromName,
|
||||||
|
channelIdEx: 'whatsapp',
|
||||||
group: group
|
group: group
|
||||||
},
|
},
|
||||||
replyToId: from
|
replyToId: from
|
||||||
|
|
Loading…
Add table
Reference in a new issue