From 5e8c7493d949f91019431ca759cc51f3be1614a1 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Tue, 9 Apr 2024 23:47:35 +0300 Subject: [PATCH] mu-server: get rid of the sent-handler We no longer need it; we can handle mu4e's sending directly in mu4e-compose. --- lib/mu-server.cc | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/lib/mu-server.cc b/lib/mu-server.cc index c508dd89..be1c6aa1 100644 --- a/lib/mu-server.cc +++ b/lib/mu-server.cc @@ -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) {