diff options
author | Michael Jurkoic <mjjurkoic@gmail.com> | 2024-03-12 09:34:35 -0500 |
---|---|---|
committer | Michael Jurkoic <mjjurkoic@gmail.com> | 2024-03-12 09:34:35 -0500 |
commit | 760d5d9adab13edc090f64437415b41b229481f8 (patch) | |
tree | 98f49f3c7dbd56c4852f6d8adcc582f723c47808 /src/nostr_service.cpp | |
parent | 6134935fd0c7adfb097824ea9e57207e3f97423b (diff) |
Pass references into lambda
Unit tests for event publishing currently fail due to event validation. A signer will need to be implemented before tests pass.
Diffstat (limited to 'src/nostr_service.cpp')
-rw-r--r-- | src/nostr_service.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nostr_service.cpp b/src/nostr_service.cpp index 09be6e3..4f4aadc 100644 --- a/src/nostr_service.cpp +++ b/src/nostr_service.cpp @@ -112,12 +112,12 @@ tuple<RelayList, RelayList> NostrService::publishEvent(Event event) PLOG_INFO << "Attempting to publish event to Nostr relays."; vector<future<tuple<string, bool>>> publishFutures; - for (string relay : this->_activeRelays) + for (const string& relay : this->_activeRelays) { - future<tuple<string, bool>> publishFuture = async([this, relay, event]() { + future<tuple<string, bool>> publishFuture = async([this, &relay, &event]() { return this->_client->send(event.serialize(), relay); }); - + publishFutures.push_back(move(publishFuture)); } |