aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTobias Fella <fella@posteo.de>2021-11-22 21:44:22 +0100
committerTobias Fella <fella@posteo.de>2021-12-01 21:56:11 +0100
commit6190e2b23a5ef62530a90fc03e264605e716ad2e (patch)
treea3ea46b86af3e3a5be53785ec0359457e1da4ed6 /lib
parent0bafc33d70ddfdc8c4015a7f330623c726fe7ef7 (diff)
downloadlibquotient-6190e2b23a5ef62530a90fc03e264605e716ad2e.tar.gz
libquotient-6190e2b23a5ef62530a90fc03e264605e716ad2e.zip
Fix olm error parsing
Diffstat (limited to 'lib')
-rw-r--r--lib/crypto/qolmerrors.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/crypto/qolmerrors.cpp b/lib/crypto/qolmerrors.cpp
index 2c3926de..6db1803c 100644
--- a/lib/crypto/qolmerrors.cpp
+++ b/lib/crypto/qolmerrors.cpp
@@ -6,15 +6,15 @@
#include "qolmerrors.h"
Quotient::QOlmError Quotient::fromString(const std::string &error_raw) {
- if (error_raw.compare("BAD_ACCOUNT_KEY")) {
+ if (!error_raw.compare("BAD_ACCOUNT_KEY")) {
return QOlmError::BadAccountKey;
- } else if (error_raw.compare("BAD_MESSAGE_KEY_ID")) {
+ } else if (!error_raw.compare("BAD_MESSAGE_KEY_ID")) {
return QOlmError::BadMessageKeyId;
- } else if (error_raw.compare("INVALID_BASE64")) {
+ } else if (!error_raw.compare("INVALID_BASE64")) {
return QOlmError::InvalidBase64;
- } else if (error_raw.compare("NOT_ENOUGH_RANDOM")) {
+ } else if (!error_raw.compare("NOT_ENOUGH_RANDOM")) {
return QOlmError::NotEnoughRandom;
- } else if (error_raw.compare("OUTPUT_BUFFER_TOO_SMALL")) {
+ } else if (!error_raw.compare("OUTPUT_BUFFER_TOO_SMALL")) {
return QOlmError::OutputBufferTooSmall;
} else {
return QOlmError::Unknown;