diff --git a/solanaceae/tox_contacts/tox_contact_model2.cpp b/solanaceae/tox_contacts/tox_contact_model2.cpp index 89ee4c9..d035727 100644 --- a/solanaceae/tox_contacts/tox_contact_model2.cpp +++ b/solanaceae/tox_contacts/tox_contact_model2.cpp @@ -466,6 +466,14 @@ bool ToxContactModel2::onToxEvent(const Tox_Event_Group_Self_Join* e) { auto c = getContactGroupPeer(group_number, self_id_opt.value()); c.emplace_or_replace(); c.emplace_or_replace(Contact::Components::ConnectionState::State::direct); + + auto gc = getContactGroup(group_number); + assert(static_cast(gc)); // should be no failure mode + gc.emplace_or_replace( + _t.toxGroupIsConnected(group_number).value_or(false) + ? Contact::Components::ConnectionState::State::cloud + : Contact::Components::ConnectionState::State::disconnected + ); } else { assert(false); }