diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-12-25 14:46:18 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-12-25 14:46:18 +0900 |
commit | cbfe29b3435fbe47fee268facbe6a82000fce0ad (patch) | |
tree | e922f1a1505ff1d0a3cdaca56ed5fd151c3aa410 /events/roommessageevent.cpp | |
parent | b1dd0e7ea87842fb5ff9deb14beb3474136b06f3 (diff) | |
parent | a4a1129385731c3999a6d5986a24fc069938245c (diff) | |
download | libquotient-cbfe29b3435fbe47fee268facbe6a82000fce0ad.tar.gz libquotient-cbfe29b3435fbe47fee268facbe6a82000fce0ad.zip |
Merge branch 'master' into kitsune-gtad
Diffstat (limited to 'events/roommessageevent.cpp')
-rw-r--r-- | events/roommessageevent.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/events/roommessageevent.cpp b/events/roommessageevent.cpp index f06474e9..bc41abf6 100644 --- a/events/roommessageevent.cpp +++ b/events/roommessageevent.cpp @@ -58,7 +58,6 @@ QString msgTypeToJson(MsgType enumType) if (it != msgTypes.end()) return it->jsonType; - qCCritical(EVENTS) << "Unknown msgtype:" << enumType; return {}; } @@ -69,8 +68,7 @@ MsgType jsonToMsgType(const QString& jsonType) if (it != msgTypes.end()) return it->enumType; - qCCritical(EVENTS) << "Unknown msgtype:" << jsonType; - return {}; + return MsgType::Unknown; } RoomMessageEvent::RoomMessageEvent(const QString& plainBody, @@ -81,6 +79,8 @@ RoomMessageEvent::RoomMessageEvent(const QString& plainBody, RoomMessageEvent::RoomMessageEvent(const QJsonObject& obj) : RoomEvent(Type::RoomMessage, obj), _content(nullptr) { + if (isRedacted()) + return; const QJsonObject content = contentJson(); if ( content.contains("msgtype") && content.contains("body") ) { |