summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-01-25 15:28:35 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2021-01-25 15:28:35 +0100
commit6313ecb7d4e67d0b89ef55f6a1991bc86b4093ae (patch)
tree9f4af76825d9e7827d0046825020ce48e0f8f87b /src
parentFix old messages being played back after limit reset (diff)
downloadnheko-6313ecb7d4e67d0b89ef55f6a1991bc86b4093ae.tar.xz
Treat empty secrets as no secret
Diffstat (limited to 'src')
-rw-r--r--src/Cache.cpp4
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(); }