ircd:Ⓜ️:user::registar: Allow full mxid argument w/ localname extraction.
This commit is contained in:
parent
119f5a88fc
commit
2aa1d6520a
|
@ -36,9 +36,11 @@ const
|
||||||
|
|
||||||
// 3.3.1 The local part of the desired Matrix ID. If omitted, the homeserver MUST
|
// 3.3.1 The local part of the desired Matrix ID. If omitted, the homeserver MUST
|
||||||
// generate a Matrix ID local part.
|
// generate a Matrix ID local part.
|
||||||
const auto &username
|
const string_view username
|
||||||
{
|
{
|
||||||
json::get<"username"_>(*this)
|
valid(m::id::USER, json::get<"username"_>(*this))?
|
||||||
|
m::id::user(json::get<"username"_>(*this)).localname():
|
||||||
|
string_view(json::get<"username"_>(*this))
|
||||||
};
|
};
|
||||||
|
|
||||||
// Generate canonical mxid. The home_server is appended if one is not
|
// Generate canonical mxid. The home_server is appended if one is not
|
||||||
|
|
Loading…
Reference in New Issue