0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

modules/client/account: Fix user account activation related.

This commit is contained in:
Jason Volk 2018-03-08 16:25:52 -08:00
parent f2a39394cd
commit 84e37b9635
3 changed files with 17 additions and 3 deletions

View file

@ -227,7 +227,10 @@ ircd::m::init::bootstrap()
);
create(user::users, me.user_id);
me.activate();
me.activate(
{
{ "active", true }
});
create(my_room, me.user_id);
send(my_room, me.user_id, "m.room.name", "",

View file

@ -70,7 +70,7 @@ is_active__user(const m::user &user)
at<"content"_>(event)
};
ret = content.get("active") == "true";
ret = content.get<bool>("active") == true;
});
return ret;

View file

@ -102,7 +102,10 @@ try
// for this user in the form of !@user:host and set a key in !users:host
// If the user_id is taken this throws 409 Conflict because those assets
// will already exist; otherwise the user is registered after this call.
user.activate();
user.activate(
{
{ "active", true }
});
// Set the password for the account. This issues an ircd.password state
// event to the user's room. User will be able to login with
@ -291,6 +294,14 @@ _first_user_registered(const m::event &event)
at<"state_key"_>(event)
};
const auto &content
{
at<"content"_>(event)
};
if(!content.get<bool>("active"))
return;
join(m::control, user);
already = true;
}