diff options
| author | saturneric <[email protected]> | 2026-09-24 22:47:57 +0200 |
|---|---|---|
| committer | saturneric <[email protected]> | 2026-09-24 22:47:57 +0200 |
| commit | 3f35eadd77b34a5ab13f89772583d153bbebdc70 (patch) | |
| tree | 14805ea3b65565e5902f77d3b954b33671d0e0b8 /src/m_key_server_sync/KeyServerBatchLogic.h | |
| parent | feat(im): add instant messaging token module (diff) | |
| download | modules-3f35eadd77b34a5ab13f89772583d153bbebdc70.tar.gz modules-3f35eadd77b34a5ab13f89772583d153bbebdc70.zip | |
fix(key-server): handle missing keys consistently
- normalize 404 and empty responses as plain not-found results
- distinguish missing keys from transport failures in publication checks
- add key-server not-found helpers and unit coverage
- disable batch actions for key groups and empty targets
- add publish and refresh actions to the key manager menu
- reformat affected C++ declarations and callbacks
Diffstat (limited to 'src/m_key_server_sync/KeyServerBatchLogic.h')
| -rw-r--r-- | src/m_key_server_sync/KeyServerBatchLogic.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/m_key_server_sync/KeyServerBatchLogic.h b/src/m_key_server_sync/KeyServerBatchLogic.h index 439ef87..60ea682 100644 --- a/src/m_key_server_sync/KeyServerBatchLogic.h +++ b/src/m_key_server_sync/KeyServerBatchLogic.h @@ -68,6 +68,13 @@ auto Normalise(const std::optional<BatchKey>& key, */ auto JoinForImport(const QList<QByteArray>& blocks) -> QByteArray; +/// What a lookup failure says when the server simply does not have the key: +/// not an error, and never the transport's own wording. +auto NotFoundText() -> QString; + +/// Whether @p error is NotFoundText(). +auto IsNotFound(const QString& error) -> bool; + /// What a finished refresh says, e.g. "3 of 4 keys fetched" plus failures. auto RefreshSummary(int fetched, int total, const QStringList& failures) -> QString; |
