Skip to content

Commit

Permalink
Merge pull request #131 from opslag/master
Browse files Browse the repository at this point in the history
feat: Make relay URL available in plugin
  • Loading branch information
hoytech authored Dec 20, 2024
2 parents baf3ec5 + 9ba0626 commit 54da4a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/apps/mesh/cmd_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void cmd_stream(const std::vector<std::string> &subArgs) {
auto &evJson = origJson.at(2);

std::string okMsg;
auto res = writePolicyPlugin.acceptEvent(cfg().relay__writePolicy__plugin, evJson, EventSourceType::Stream, ws.remoteAddr, okMsg);
auto res = writePolicyPlugin.acceptEvent(cfg().relay__writePolicy__plugin, evJson, EventSourceType::Stream, url, okMsg);
if (res == PluginEventSifterResult::Accept) {
downloadedIds.emplace(from_hex(evJson.at("id").get_string()));
writer.write({ std::move(evJson), });
Expand Down
2 changes: 1 addition & 1 deletion src/apps/mesh/cmd_sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ void cmd_sync(const std::vector<std::string> &subArgs) {
auto &evJson = msg.at(2);

std::string okMsg;
auto res = writePolicyPlugin.acceptEvent(cfg().relay__writePolicy__plugin, evJson, EventSourceType::Sync, ws.remoteAddr, okMsg);
auto res = writePolicyPlugin.acceptEvent(cfg().relay__writePolicy__plugin, evJson, EventSourceType::Sync, url, okMsg);
if (res == PluginEventSifterResult::Accept) {
writer.write({ std::move(evJson), });
} else {
Expand Down

0 comments on commit 54da4a7

Please sign in to comment.