diff options
Diffstat (limited to 'framework')
-rw-r--r-- | framework/domain/actions/sinkactions.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/framework/domain/actions/sinkactions.cpp b/framework/domain/actions/sinkactions.cpp index 39b39a0a..e8127ee6 100644 --- a/framework/domain/actions/sinkactions.cpp +++ b/framework/domain/actions/sinkactions.cpp | |||
@@ -95,6 +95,21 @@ static ActionHandlerHelper synchronizeHandler("org.kde.kube.actions.synchronize" | |||
95 | } | 95 | } |
96 | ); | 96 | ); |
97 | 97 | ||
98 | static ActionHandlerHelper sendOutboxHandler("org.kde.kube.actions.sendOutbox", | ||
99 | [](Context *context) -> bool { | ||
100 | return true; | ||
101 | }, | ||
102 | ActionHandlerHelper::JobHandler{[](Context *context) -> KAsync::Job<void> { | ||
103 | using namespace Sink::ApplicationDomain; | ||
104 | Query query; | ||
105 | query.containsFilter<SinkResource::Capabilities>(ResourceCapabilities::Mail::transport); | ||
106 | return Store::fetchAll<SinkResource>(query) | ||
107 | .each([=](const SinkResource::Ptr &resource) -> KAsync::Job<void> { | ||
108 | return Store::synchronize(SyncScope{}.resourceFilter(resource->identifier())); | ||
109 | }); | ||
110 | }} | ||
111 | ); | ||
112 | |||
98 | static ActionHandlerHelper sendMailHandler("org.kde.kube.actions.sendmail", | 113 | static ActionHandlerHelper sendMailHandler("org.kde.kube.actions.sendmail", |
99 | [](Context *context) -> bool { | 114 | [](Context *context) -> bool { |
100 | auto accountId = context->property("accountId").value<QByteArray>(); | 115 | auto accountId = context->property("accountId").value<QByteArray>(); |