mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 08:12:37 +01:00
ircd::json: Perform unquote() in json::string ctor as described...
This commit is contained in:
parent
f5b73ce0c4
commit
0d688b386b
3 changed files with 7 additions and 3 deletions
|
@ -86,7 +86,11 @@ namespace ircd
|
|||
struct ircd::json::string
|
||||
:string_view
|
||||
{
|
||||
using string_view::string_view;
|
||||
string(const string_view &s)
|
||||
:string_view{unquote(s)}
|
||||
{}
|
||||
|
||||
string() = default;
|
||||
};
|
||||
|
||||
template<size_t SIZE>
|
||||
|
|
|
@ -165,7 +165,7 @@ try
|
|||
|
||||
m::event receipt;
|
||||
json::get<"depth"_>(receipt) = json::undefined_number;
|
||||
json::get<"type"_>(receipt) = "m.receipt";
|
||||
json::get<"type"_>(receipt) = "m.receipt"_sv;
|
||||
json::get<"room_id"_>(receipt) = room_id;
|
||||
json::get<"sender"_>(receipt) = user_id;
|
||||
json::get<"origin"_>(receipt) = user_id.host();
|
||||
|
|
|
@ -81,7 +81,7 @@ _handle_edu_m_typing(const m::event &event,
|
|||
|
||||
m::event typing{event};
|
||||
json::get<"room_id"_>(typing) = room_id;
|
||||
json::get<"type"_>(typing) = "m.typing";
|
||||
json::get<"type"_>(typing) = "m.typing"_sv;
|
||||
|
||||
char buf[512];
|
||||
const json::value user_ids[]
|
||||
|
|
Loading…
Reference in a new issue