0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ircd:Ⓜ️:register: Use json::string types here; simplify.

This commit is contained in:
Jason Volk 2019-02-18 16:44:28 -08:00
parent aed1c856ef
commit ddf76fe502
2 changed files with 6 additions and 6 deletions

View file

@ -19,11 +19,11 @@ namespace ircd::m
struct ircd::m::registar
:json::tuple
<
json::property<name::username, string_view>,
json::property<name::username, json::string>,
json::property<name::bind_email, bool>,
json::property<name::password, string_view>,
json::property<name::password, json::string>,
json::property<name::auth, json::object>,
json::property<name::device_id, string_view>,
json::property<name::device_id, json::string>,
json::property<name::inhibit_login, bool>
>
{

View file

@ -214,7 +214,7 @@ register_user(const m::registar &request,
// generate a Matrix ID local part.
const auto &username
{
unquote(json::get<"username"_>(request))
json::get<"username"_>(request)
};
// Generate canonical mxid. The home_server is appended if one is not
@ -231,7 +231,7 @@ register_user(const m::registar &request,
// 3.3.1 Required. The desired password for the account.
const auto &password
{
unquote(at<"password"_>(request))
at<"password"_>(request)
};
// (r0.3.0) 3.4.1 ID of the client device. If this does not correspond to a
@ -239,7 +239,7 @@ register_user(const m::registar &request,
// generate a device_id if this is not specified.
const auto requested_device_id
{
unquote(json::get<"device_id"_>(request))
json::get<"device_id"_>(request)
};
const m::id::device::buf device_id