dont request from self

This commit is contained in:
Green Sky 2024-04-15 11:48:17 +02:00
parent 61b667a4aa
commit 0d40d1abaa
No known key found for this signature in database
1 changed files with 4 additions and 0 deletions

View File

@ -219,6 +219,10 @@ std::optional<std::pair<uint32_t, uint32_t>> SHA1_NGCFT1::selectPeerForRequest(C
continue;
}
if (_cr.all_of<Contact::Components::TagSelfStrong>(child)) {
continue; // skip self
}
if (_cr.all_of<Contact::Components::ToxGroupPeerEphemeral>(child)) {
const auto& tgpe = _cr.get<Contact::Components::ToxGroupPeerEphemeral>(child);
un_tox_peers.push_back(tgpe.peer_number);