mirror of https://github.com/djcb/mu.git
mu-server: get rid of the sent-handler
We no longer need it; we can handle mu4e's sending directly in mu4e-compose.
This commit is contained in:
parent
eda8db0c3b
commit
5e8c7493d9
|
@ -184,7 +184,6 @@ struct Server::Private {
|
|||
void queries_handler(const Command& cmd);
|
||||
void quit_handler(const Command& cmd);
|
||||
void remove_handler(const Command& cmd);
|
||||
void sent_handler(const Command& cmd);
|
||||
void view_handler(const Command& cmd);
|
||||
|
||||
private:
|
||||
|
@ -414,12 +413,6 @@ Server::Private::make_command_map()
|
|||
"remove a message from filesystem and database",
|
||||
[&](const auto& params) { remove_handler(params); }});
|
||||
|
||||
cmap.emplace(
|
||||
"sent",
|
||||
CommandInfo{ArgMap{{":path", ArgInfo{Type::String, true, "path to the message file"}}},
|
||||
"tell mu about a message that was sent",
|
||||
[&](const auto& params) { sent_handler(params); }});
|
||||
|
||||
cmap.emplace(
|
||||
"view",
|
||||
CommandInfo{ArgMap{
|
||||
|
@ -983,21 +976,6 @@ Server::Private::remove_handler(const Command& cmd)
|
|||
output_sexp(Sexp().put_props(":remove", docid)); // act as if it worked.
|
||||
}
|
||||
|
||||
void
|
||||
Server::Private::sent_handler(const Command& cmd)
|
||||
{
|
||||
const auto path{cmd.string_arg(":path").value_or("")};
|
||||
const auto docid = store().add_message(path);
|
||||
if (!docid)
|
||||
throw Error{Error::Code::Store, "failed to add path: {}: {}",
|
||||
path, docid.error().what()};
|
||||
|
||||
output_sexp(Sexp().put_props(
|
||||
":sent", Sexp::t_sym,
|
||||
":path", path,
|
||||
":docid", docid.value()));
|
||||
}
|
||||
|
||||
void
|
||||
Server::Private::view_mark_as_read(Store::Id docid, Message&& msg, bool rename)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue