aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLibravatar Michael Jurkoic <mjjurkoic@gmail.com>2024-03-12 09:34:35 -0500
committerLibravatar Michael Jurkoic <mjjurkoic@gmail.com>2024-03-12 09:34:35 -0500
commit760d5d9adab13edc090f64437415b41b229481f8 (patch)
tree98f49f3c7dbd56c4852f6d8adcc582f723c47808 /src
parent6134935fd0c7adfb097824ea9e57207e3f97423b (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')
-rw-r--r--src/nostr_service.cpp6
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));
}