@@ -158,6 +158,13 @@ SocketApi::SocketApi(QObject *parent)
158158 unregisterAccount (accountState->account ());
159159 }
160160 });
161+
162+ const QJsonObject args { { QStringLiteral (" size" ), 5 } };
163+ const QJsonObject obj { { QStringLiteral (" id" ), QString::number (17 ) }, { QStringLiteral (" arguments" ), args } };
164+ const auto json = QJsonDocument (obj).toJson (QJsonDocument::Indented);
165+
166+ qCDebug (lcSocketApi) << u" JSON:" << json;
167+
161168}
162169
163170SocketApi::~SocketApi ()
@@ -283,7 +290,7 @@ void SocketApi::slotReadSocket()
283290 }
284291 } else if (command.startsWith (QLatin1String (" V2/" ))) {
285292 QJsonParseError error;
286- const auto json = QJsonDocument::fromJson (argument.toUtf8 (), &error).object ();
293+ const auto json = QJsonDocument::fromJson (argument.trimmed (). toUtf8 (), &error).object ();
287294 if (error.error != QJsonParseError::NoError) {
288295 qCWarning (lcSocketApi ()) << u" Invalid json" << argument << error.errorString ();
289296 listener->sendError (error.errorString ());
@@ -709,6 +716,16 @@ void SocketApi::command_V2_GET_CLIENT_ICON(const QSharedPointer<SocketApiJobV2>
709716 job->success ({ { QStringLiteral (" png" ), QString::fromUtf8 (data) } });
710717}
711718
719+ void SocketApi::command_V2_HYDRATE_FILE (const QSharedPointer<SocketApiJobV2> &job) const
720+ {
721+ OC_ASSERT (job);
722+ const auto &arguments = job->arguments ();
723+
724+ hydrate_the_file ähnlich zu VfsXattr::handleAction.
725+
726+ job->success ({ {QStringLiteral (" hydration" ), QStringLiteral (" STARTED" ) } });
727+ }
728+
712729void SocketApi::emailPrivateLink (const QUrl &link)
713730{
714731 Utility::openEmailComposer (
0 commit comments