mirror of
https://github.com/matrix-construct/construct
synced 2024-12-28 08:24:08 +01:00
ircd:Ⓜ️:event::prev: Stronger json::object type for v1 tuple value at indice.
This commit is contained in:
parent
5d570a8da4
commit
e7b66eac3b
2 changed files with 9 additions and 9 deletions
|
@ -42,9 +42,9 @@ struct ircd::m::event::prev
|
||||||
json::property<name::prev_events, json::array>
|
json::property<name::prev_events, json::array>
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
std::tuple<event::id, string_view> auth_events(const size_t &idx) const;
|
std::tuple<event::id, json::object> auth_events(const size_t &idx) const;
|
||||||
std::tuple<event::id, string_view> prev_states(const size_t &idx) const;
|
std::tuple<event::id, json::object> prev_states(const size_t &idx) const;
|
||||||
std::tuple<event::id, string_view> prev_events(const size_t &idx) const;
|
std::tuple<event::id, json::object> prev_events(const size_t &idx) const;
|
||||||
|
|
||||||
event::id auth_event(const size_t &idx) const;
|
event::id auth_event(const size_t &idx) const;
|
||||||
event::id prev_state(const size_t &idx) const;
|
event::id prev_state(const size_t &idx) const;
|
||||||
|
|
|
@ -2955,7 +2955,7 @@ const
|
||||||
return std::get<0>(prev_events(idx));
|
return std::get<0>(prev_events(idx));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::tuple<ircd::m::event::id, ircd::string_view>
|
std::tuple<ircd::m::event::id, ircd::json::object>
|
||||||
ircd::m::event::prev::auth_events(const size_t &idx)
|
ircd::m::event::prev::auth_events(const size_t &idx)
|
||||||
const
|
const
|
||||||
{
|
{
|
||||||
|
@ -2971,7 +2971,7 @@ const
|
||||||
{
|
{
|
||||||
const json::array &prev(prev_);
|
const json::array &prev(prev_);
|
||||||
const json::string &prev_id(prev.at(0));
|
const json::string &prev_id(prev.at(0));
|
||||||
return {prev_id, unquote(prev[1])};
|
return {prev_id, prev[1]};
|
||||||
}
|
}
|
||||||
|
|
||||||
// v3/v4 event format
|
// v3/v4 event format
|
||||||
|
@ -2988,7 +2988,7 @@ const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::tuple<ircd::m::event::id, ircd::string_view>
|
std::tuple<ircd::m::event::id, ircd::json::object>
|
||||||
ircd::m::event::prev::prev_states(const size_t &idx)
|
ircd::m::event::prev::prev_states(const size_t &idx)
|
||||||
const
|
const
|
||||||
{
|
{
|
||||||
|
@ -3003,7 +3003,7 @@ const
|
||||||
{
|
{
|
||||||
const json::array &prev(prev_);
|
const json::array &prev(prev_);
|
||||||
const json::string &prev_id(prev.at(0));
|
const json::string &prev_id(prev.at(0));
|
||||||
return {prev_id, unquote(prev[1])};
|
return {prev_id, prev[1]};
|
||||||
}
|
}
|
||||||
|
|
||||||
case json::STRING:
|
case json::STRING:
|
||||||
|
@ -3019,7 +3019,7 @@ const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::tuple<ircd::m::event::id, ircd::string_view>
|
std::tuple<ircd::m::event::id, ircd::json::object>
|
||||||
ircd::m::event::prev::prev_events(const size_t &idx)
|
ircd::m::event::prev::prev_events(const size_t &idx)
|
||||||
const
|
const
|
||||||
{
|
{
|
||||||
|
@ -3035,7 +3035,7 @@ const
|
||||||
{
|
{
|
||||||
const json::array &prev(prev_);
|
const json::array &prev(prev_);
|
||||||
const json::string &prev_id(prev.at(0));
|
const json::string &prev_id(prev.at(0));
|
||||||
return {prev_id, unquote(prev[1])};
|
return {prev_id, prev[1]};
|
||||||
}
|
}
|
||||||
|
|
||||||
// v3/v4 event format
|
// v3/v4 event format
|
||||||
|
|
Loading…
Reference in a new issue