diff options
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)); } |