mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-16 08:18:51 +00:00
I submit to the might of DougSC
The acceptEvent is expecting to parse a JSON string. Instead of evJson.get_string() try tao::json::to_string(evJson) and it worked
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,4 +3,4 @@
|
||||
*.o
|
||||
/strfry
|
||||
/strfry-db/*.mdb
|
||||
.vscode/c_cpp_properties.json
|
||||
.vscode/*
|
||||
|
@ -70,7 +70,7 @@ void cmd_stream(const std::vector<std::string> &subArgs) {
|
||||
|
||||
// bortloff@github hacks in writePolicy here
|
||||
std::string okMsg;
|
||||
auto res = writePolicy.acceptEvent(evJson.get_string(), hoytech::curr_time_s(), EventSourceType::Stream, ws.connected_addr, okMsg);
|
||||
auto res = writePolicy.acceptEvent(tao::json::to_string(evJson), hoytech::curr_time_s(), EventSourceType::Stream, ws.connected_addr, okMsg);
|
||||
if (res == WritePolicyResult::Accept) {
|
||||
downloadedIds.emplace(from_hex(evJson.at("id").get_string()));
|
||||
writer.inbox.push_move({ std::move(evJson), EventSourceType::Stream, url });
|
||||
|
Reference in New Issue
Block a user