Skip to content
Snippets Groups Projects
Verified Commit 8dd9214f authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Revert "Use some concepts"

This reverts commit a5bd5d00.
parent 7cf85aab
No related branches found
No related tags found
No related merge requests found
Pipeline #3659 failed
......@@ -81,14 +81,15 @@ to_json(json &obj, const Login &request)
std::visit(
[&obj](const auto &id) {
if constexpr (std::same_as<const login_identifier::User &, decltype(id)>) {
if constexpr (std::is_same_v<const login_identifier::User &, decltype(id)>) {
obj["identifier"]["type"] = "m.id.user";
obj["identifier"]["user"] = id.user;
} else if constexpr (std::same_as<const login_identifier::Thirdparty &, decltype(id)>) {
} else if constexpr (std::is_same_v<const login_identifier::Thirdparty &, decltype(id)>) {
obj["identifier"]["type"] = "m.id.thirdparty";
obj["identifier"]["medium"] = id.medium;
obj["identifier"]["address"] = id.address;
} else if constexpr (std::same_as<const login_identifier::PhoneNumber &, decltype(id)>) {
} else if constexpr (std::is_same_v<const login_identifier::PhoneNumber &,
decltype(id)>) {
obj["identifier"]["type"] = "m.id.phone";
obj["identifier"]["country"] = id.country;
obj["identifier"]["phone"] = id.phone;
......
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