mirror of
https://github.com/matrix-construct/construct
synced 2024-10-02 21:59:02 +02:00
modules/console: Add cmd to trigger m::user::profile::fetch().
This commit is contained in:
parent
33d3764c71
commit
faf0914f23
1 changed files with 30 additions and 0 deletions
|
@ -9081,6 +9081,36 @@ console_cmd__user__profile(opt &out, const string_view &line)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
console_cmd__user__profile__fetch(opt &out, const string_view &line)
|
||||||
|
{
|
||||||
|
const params param{line, " ",
|
||||||
|
{
|
||||||
|
"user_id", "key", "remote"
|
||||||
|
}};
|
||||||
|
|
||||||
|
const m::user::id &user_id
|
||||||
|
{
|
||||||
|
param.at("user_id")
|
||||||
|
};
|
||||||
|
|
||||||
|
const string_view &key
|
||||||
|
{
|
||||||
|
param["key"]
|
||||||
|
};
|
||||||
|
|
||||||
|
const net::hostport &remote
|
||||||
|
{
|
||||||
|
param["remote"]?
|
||||||
|
param["remote"]:
|
||||||
|
user_id.host()
|
||||||
|
};
|
||||||
|
|
||||||
|
m::user::profile::fetch(user_id, remote, key);
|
||||||
|
out << "done" << std::endl;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
console_cmd__user__account_data(opt &out, const string_view &line)
|
console_cmd__user__account_data(opt &out, const string_view &line)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue