Skip to content
Snippets Groups Projects
Commit 4a3d668b authored by Jason Volk's avatar Jason Volk
Browse files

prev_batch and limited fields are not required; defaults added.

parent 8841d5f0
No related branches found
No related tags found
No related merge requests found
......@@ -25,8 +25,8 @@ from_json(const json &obj, State &state)
void
from_json(const json &obj, Timeline &timeline)
{
timeline.prev_batch = obj.at("prev_batch");
timeline.limited = obj.at("limited");
timeline.prev_batch = obj.value("prev_batch", std::string{});
timeline.limited = obj.value("limited", false);
utils::parse_timeline_events(obj.at("events"), timeline.events);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment