mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-23 04:22:02 -06:00
Handle optional chaining for 'settings.msg_call', this change prevents 'TypeError: Cannot read properties of undefined' errors when 'msg_call' is undefined.
This commit is contained in:
parent
d0a5ae1da4
commit
52d6a563d6
@ -1801,7 +1801,7 @@ export class WAStartupService {
|
||||
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');
|
||||
const msg = await this.client.sendMessage(call.from, {
|
||||
text: settings.msg_call,
|
||||
|
Loading…
Reference in New Issue
Block a user