diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-01-25 15:28:35 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-01-25 15:28:35 +0100 |
commit | 6313ecb7d4e67d0b89ef55f6a1991bc86b4093ae (patch) | |
tree | 9f4af76825d9e7827d0046825020ce48e0f8f87b /src/Cache.cpp | |
parent | Fix old messages being played back after limit reset (diff) | |
download | nheko-6313ecb7d4e67d0b89ef55f6a1991bc86b4093ae.tar.xz |
Treat empty secrets as no secret
Diffstat (limited to '')
-rw-r--r-- | src/Cache.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Cache.cpp b/src/Cache.cpp index 6b3067db..de377f49 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp @@ -661,6 +661,10 @@ Cache::secret(const std::string &name) "Restoring secret '{}' failed: {}", name, job.errorString().toStdString()); return std::nullopt; } + if (secret.isEmpty()) { + nhlog::db()->debug("Restored empty secret '{}'.", name); + return std::nullopt; + } return secret.toStdString(); } |