Merge pull request #197 from vitorogen/develop

Handle optional chaining for 'settings.msg_call', this change prevent…
This commit is contained in:
Davidson Gomes 2023-11-05 19:44:27 -03:00 committed by GitHub
commit 2bd111f1e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,