aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/events/roomcreateevent.cpp4
-rw-r--r--lib/events/stateevent.h5
-rw-r--r--lib/room.cpp6
3 files changed, 7 insertions, 8 deletions
diff --git a/lib/events/roomcreateevent.cpp b/lib/events/roomcreateevent.cpp
index c72b5bc2..0fc7d6b9 100644
--- a/lib/events/roomcreateevent.cpp
+++ b/lib/events/roomcreateevent.cpp
@@ -33,8 +33,8 @@ QString RoomCreateEvent::version() const
RoomCreateEvent::Predecessor RoomCreateEvent::predecessor() const
{
const auto predJson = contentJson()["predecessor"_ls].toObject();
- return { fromJson<QString>(predJson["room_id"_ls]),
- fromJson<QString>(predJson["event_id"_ls]) };
+ return { fromJson<QString>(predJson[RoomIdKeyL]),
+ fromJson<QString>(predJson[EventIdKeyL]) };
}
bool RoomCreateEvent::isUpgrade() const
diff --git a/lib/events/stateevent.h b/lib/events/stateevent.h
index 710b4271..400858db 100644
--- a/lib/events/stateevent.h
+++ b/lib/events/stateevent.h
@@ -23,12 +23,11 @@
namespace Quotient {
/// Make a minimal correct Matrix state event JSON
-template <typename StrT>
-inline QJsonObject basicStateEventJson(StrT matrixType,
+inline QJsonObject basicStateEventJson(const QString& matrixTypeId,
const QJsonObject& content,
const QString& stateKey = {})
{
- return { { TypeKey, std::forward<StrT>(matrixType) },
+ return { { TypeKey, matrixTypeId },
{ StateKeyKey, stateKey },
{ ContentKey, content } };
}
diff --git a/lib/room.cpp b/lib/room.cpp
index 09e3dea2..3b5a80a4 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -1284,7 +1284,7 @@ const StateEventBase* Room::getCurrentState(const QString& evtType,
RoomEventPtr Room::decryptMessage(const EncryptedEvent& encryptedEvent)
{
#ifndef Quotient_E2EE_ENABLED
- Q_UNUSED(encryptedEvent);
+ Q_UNUSED(encryptedEvent)
qCWarning(E2EE) << "End-to-end encryption (E2EE) support is turned off.";
return {};
#else // Quotient_E2EE_ENABLED
@@ -1309,8 +1309,8 @@ void Room::handleRoomKeyEvent(const RoomKeyEvent& roomKeyEvent,
const QString& senderKey)
{
#ifndef Quotient_E2EE_ENABLED
- Q_UNUSED(roomKeyEvent);
- Q_UNUSED(senderKey);
+ Q_UNUSED(roomKeyEvent)
+ Q_UNUSED(senderKey)
qCWarning(E2EE) << "End-to-end encryption (E2EE) support is turned off.";
return;
#else // Quotient_E2EE_ENABLED