mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Toggle calls controls using config and user flags.
Also use calls timeout values from config. Also request config each time when the auth session changes.
This commit is contained in:
@@ -197,6 +197,8 @@ void Instance::handleCallUpdate(const MTPPhoneCall &call) {
|
||||
}
|
||||
if (_currentCall || !user || user->isSelf()) {
|
||||
request(MTPphone_DiscardCall(MTP_inputPhoneCall(phoneCall.vid, phoneCall.vaccess_hash), MTP_int(0), MTP_phoneCallDiscardReasonBusy(), MTP_long(0))).send();
|
||||
} else if (phoneCall.vdate.v + Global::CallRingTimeoutMs() / 1000 < unixtime()) {
|
||||
LOG(("Ignoring too old call."));
|
||||
} else {
|
||||
createCall(user, Call::Type::Incoming);
|
||||
_currentCall->handleUpdate(call);
|
||||
|
Reference in New Issue
Block a user