2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

Allow disabling calls on tdesktop device.

This commit is contained in:
John Preston
2021-01-26 15:58:30 +04:00
parent ce5c19dfe9
commit 7da224d725
6 changed files with 52 additions and 13 deletions

View File

@@ -377,6 +377,8 @@ void Instance::handleCallUpdate(
} else if (phoneCall.vdate().v + (config.callRingTimeoutMs / 1000)
< base::unixtime::now()) {
LOG(("Ignoring too old call."));
} else if (Core::App().settings().disableCalls()) {
LOG(("Ignoring call because of 'accept calls' settings."));
} else {
createCall(user, Call::Type::Incoming, phoneCall.is_video());
_currentCall->handleUpdate(call);