Optimize confcall join process.

This commit is contained in:
John Preston
2025-04-10 09:33:04 +04:00
parent c72cf46db7
commit 042f51e58f
6 changed files with 16 additions and 1 deletions
@@ -1554,6 +1554,11 @@ void GroupCall::rejoin(not_null<PeerData*> as) {
).arg(_joinState.payload.ssrc));
if (!_conferenceCall && _migratedConferenceInfo) {
startConference();
} else if (_conferenceCall
&& !_conferenceCall->blockchainMayBeEmpty()
&& !_e2e->hasLastBlock0()) {
//sendJoinRequest(); AssertIsDebug();
refreshLastBlockAndJoin();
} else {
sendJoinRequest();
}
@@ -135,6 +135,10 @@ bool GroupCall::listenersHidden() const {
return _listenersHidden;
}
bool GroupCall::blockchainMayBeEmpty() const {
return _version < 2;
}
not_null<PeerData*> GroupCall::peer() const {
return _peer;
}
@@ -78,6 +78,7 @@ public:
[[nodiscard]] bool rtmp() const;
[[nodiscard]] bool canManage() const;
[[nodiscard]] bool listenersHidden() const;
[[nodiscard]] bool blockchainMayBeEmpty() const;
[[nodiscard]] not_null<PeerData*> peer() const;
[[nodiscard]] MTPInputGroupCall input() const;
[[nodiscard]] QString title() const {
+4
View File
@@ -102,6 +102,10 @@ PublicKey Call::myKey() const {
return _myKey;
}
bool Call::hasLastBlock0() const {
return _lastBlock0.has_value();
}
void Call::refreshLastBlock0(std::optional<Block> block) {
_lastBlock0 = std::move(block);
}
+1
View File
@@ -95,6 +95,7 @@ public:
[[nodiscard]] QByteArray emojiHash() const;
[[nodiscard]] rpl::producer<QByteArray> emojiHashValue() const;
[[nodiscard]] bool hasLastBlock0() const;
void refreshLastBlock0(std::optional<Block> block);
[[nodiscard]] Block makeJoinBlock();
[[nodiscard]] Block makeRemoveBlock(const base::flat_set<UserId> &ids);