mirror of
https://github.com/matrix-construct/construct
synced 2025-02-18 01:30:12 +01:00
modules/console: Update the m_room/head_modify prototype.
This commit is contained in:
parent
8dc3e7c758
commit
7bbcf63d8a
1 changed files with 4 additions and 4 deletions
|
@ -3526,13 +3526,13 @@ console_cmd__room__head__add(opt &out, const string_view &line)
|
|||
param.at(0)
|
||||
};
|
||||
|
||||
using prototype = void (const m::event::id &, const db::op &);
|
||||
using prototype = void (const m::event::id &, const db::op &, const bool &);
|
||||
static m::import<prototype> head__modify
|
||||
{
|
||||
"m_room", "head__modify"
|
||||
};
|
||||
|
||||
head__modify(event_id, db::op::SET);
|
||||
head__modify(event_id, db::op::SET, true);
|
||||
out << "Added " << event_id << " to head " << std::endl;
|
||||
return true;
|
||||
}
|
||||
|
@ -3550,13 +3550,13 @@ console_cmd__room__head__del(opt &out, const string_view &line)
|
|||
param.at(0)
|
||||
};
|
||||
|
||||
using prototype = void (const m::event::id &, const db::op &);
|
||||
using prototype = void (const m::event::id &, const db::op &, const bool &);
|
||||
static m::import<prototype> head__modify
|
||||
{
|
||||
"m_room", "head__modify"
|
||||
};
|
||||
|
||||
head__modify(event_id, db::op::DELETE);
|
||||
head__modify(event_id, db::op::DELETE, true);
|
||||
out << "Deleted " << event_id << " from head (if existed)" << std::endl;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue