mirror of
https://github.com/matrix-construct/construct
synced 2024-09-30 12:48:54 +02:00
modules/console: Add placement parameters in some room cmds.
This commit is contained in:
parent
ec80e3ddef
commit
42f10271ae
1 changed files with 16 additions and 9 deletions
|
@ -2800,13 +2800,10 @@ console_cmd__room__get(opt &out, const string_view &line)
|
||||||
bool
|
bool
|
||||||
console_cmd__room__set(opt &out, const string_view &line)
|
console_cmd__room__set(opt &out, const string_view &line)
|
||||||
{
|
{
|
||||||
const params param
|
const params param{line, " ",
|
||||||
{
|
{
|
||||||
line, " ",
|
"room_id", "sender", "type", "state_key", "content", "[prev_event_id]"
|
||||||
{
|
}};
|
||||||
"room_id", "sender", "type", "state_key", "content"
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const auto &room_id
|
const auto &room_id
|
||||||
{
|
{
|
||||||
|
@ -2833,9 +2830,14 @@ console_cmd__room__set(opt &out, const string_view &line)
|
||||||
param.at(4, json::object{})
|
param.at(4, json::object{})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const string_view prev_event_id
|
||||||
|
{
|
||||||
|
param[5]
|
||||||
|
};
|
||||||
|
|
||||||
const m::room room
|
const m::room room
|
||||||
{
|
{
|
||||||
room_id
|
room_id, prev_event_id
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto event_id
|
const auto event_id
|
||||||
|
@ -2854,7 +2856,7 @@ console_cmd__room__send(opt &out, const string_view &line)
|
||||||
{
|
{
|
||||||
line, " ",
|
line, " ",
|
||||||
{
|
{
|
||||||
"room_id", "sender", "type", "content"
|
"room_id", "sender", "type", "content", "[prev_event_id]"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2878,9 +2880,14 @@ console_cmd__room__send(opt &out, const string_view &line)
|
||||||
param.at(3, json::object{})
|
param.at(3, json::object{})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const string_view prev_event_id
|
||||||
|
{
|
||||||
|
param[4]
|
||||||
|
};
|
||||||
|
|
||||||
const m::room room
|
const m::room room
|
||||||
{
|
{
|
||||||
room_id
|
room_id, prev_event_id
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto event_id
|
const auto event_id
|
||||||
|
|
Loading…
Reference in a new issue