mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-20 17:59:50 +00:00
Merge pull request #131 from opslag/master
feat: Make relay URL available in plugin
This commit is contained in:
@ -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), });
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user