Fix repeated phoneCallRequested update handling.
This commit is contained in:
parent
c693b03a64
commit
a3e3bcd46d
|
@ -101,6 +101,9 @@ public:
|
||||||
[[nodiscard]] not_null<UserData*> user() const {
|
[[nodiscard]] not_null<UserData*> user() const {
|
||||||
return _user;
|
return _user;
|
||||||
}
|
}
|
||||||
|
[[nodiscard]] uint64 id() const {
|
||||||
|
return _id;
|
||||||
|
}
|
||||||
[[nodiscard]] bool isIncomingWaiting() const;
|
[[nodiscard]] bool isIncomingWaiting() const;
|
||||||
|
|
||||||
void start(bytes::const_span random);
|
void start(bytes::const_span random);
|
||||||
|
|
|
@ -482,6 +482,11 @@ void Instance::handleCallUpdate(
|
||||||
LOG(("API Error: User not loaded for phoneCallRequested."));
|
LOG(("API Error: User not loaded for phoneCallRequested."));
|
||||||
} else if (user->isSelf()) {
|
} else if (user->isSelf()) {
|
||||||
LOG(("API Error: Self found in phoneCallRequested."));
|
LOG(("API Error: Self found in phoneCallRequested."));
|
||||||
|
} else if (_currentCall
|
||||||
|
&& _currentCall->user() == user
|
||||||
|
&& _currentCall->id() == phoneCall.vid().v) {
|
||||||
|
// May be a repeated phoneCallRequested update from getDifference.
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
const auto &config = session->serverConfig();
|
const auto &config = session->serverConfig();
|
||||||
if (inCall() || inGroupCall() || !user || user->isSelf()) {
|
if (inCall() || inGroupCall() || !user || user->isSelf()) {
|
||||||
|
|
Loading…
Reference in New Issue