mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-25 01:48:39 -06:00
Merge pull request #197 from vitorogen/develop
Handle optional chaining for 'settings.msg_call', this change prevent…
This commit is contained in:
commit
2bd111f1e2
@ -1801,7 +1801,7 @@ export class WAStartupService {
|
|||||||
this.client.rejectCall(call.id, call.from);
|
this.client.rejectCall(call.id, call.from);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings?.msg_call.trim().length > 0 && call.status == 'offer') {
|
if (settings?.msg_call?.trim().length > 0 && call.status == 'offer') {
|
||||||
this.logger.verbose('Sending message in call');
|
this.logger.verbose('Sending message in call');
|
||||||
const msg = await this.client.sendMessage(call.from, {
|
const msg = await this.client.sendMessage(call.from, {
|
||||||
text: settings.msg_call,
|
text: settings.msg_call,
|
||||||
|
Loading…
Reference in New Issue
Block a user