Changeset View
Changeset View
Standalone View
Standalone View
src/client/client-model.cpp
| Show First 20 Lines • Show All 283 Lines • ▼ Show 20 Lines | #undef RESPONSE_FOR | ||||
| }; | }; | ||||
| immer::flex_vector<std::string /* deviceId */> ClientModel::devicesToSendKeys(std::string userId) const | immer::flex_vector<std::string /* deviceId */> ClientModel::devicesToSendKeys(std::string userId) const | ||||
| { | { | ||||
| auto trustLevelNeeded = this->trustLevelNeededToSendKeys; | auto trustLevelNeeded = this->trustLevelNeededToSendKeys; | ||||
| // XXX: preliminary approach | // XXX: preliminary approach | ||||
| auto shouldSendP = [=](auto deviceInfo, auto /* deviceMap */) { | auto shouldSendP = [=](auto deviceInfo, auto /* deviceMap */) { | ||||
| return deviceInfo.trustLevel >= trustLevelNeeded; | return deviceInfo.trustLevel >= trustLevelNeeded | ||||
| && !deviceInfo.deleted; | |||||
| }; | }; | ||||
| auto devices = deviceLists.devicesFor(userId); | auto devices = deviceLists.devicesFor(userId); | ||||
| return intoImmer( | return intoImmer( | ||||
| immer::flex_vector<std::string>{}, | immer::flex_vector<std::string>{}, | ||||
| zug::filter([=](auto n) { | zug::filter([=](auto n) { | ||||
| ▲ Show 20 Lines • Show All 238 Lines • Show Last 20 Lines | |||||