diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-12-26 19:31:11 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-01-05 21:01:30 +0900 |
commit | 4ec3dd92d2cb5af4cf4893770e29db51d23e0e67 (patch) | |
tree | f61bf9d095a420d953ee6c43e4a8ecdb1a2a5039 /lib/events/roommessageevent.cpp | |
parent | 3ecf762f497a4d4b6ea7583689c0b9b284300201 (diff) | |
download | libquotient-4ec3dd92d2cb5af4cf4893770e29db51d23e0e67.tar.gz libquotient-4ec3dd92d2cb5af4cf4893770e29db51d23e0e67.zip |
Make content in events editable
Diffstat (limited to 'lib/events/roommessageevent.cpp')
-rw-r--r-- | lib/events/roommessageevent.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/events/roommessageevent.cpp b/lib/events/roommessageevent.cpp index 1c5cf058..572c7173 100644 --- a/lib/events/roommessageevent.cpp +++ b/lib/events/roommessageevent.cpp @@ -71,8 +71,8 @@ MsgType jsonToMsgType(const QString& matrixType) return MsgType::Unknown; } -inline QJsonObject toMsgJson(const QString& plainBody, const QString& jsonMsgType, - TypedBase* content) +QJsonObject RoomMessageEvent::assembleContentJson(const QString& plainBody, + const QString& jsonMsgType, TypedBase* content) { auto json = content ? content->toJson() : QJsonObject(); json.insert(QStringLiteral("msgtype"), jsonMsgType); @@ -86,7 +86,7 @@ static const auto BodyKey = "body"_ls; RoomMessageEvent::RoomMessageEvent(const QString& plainBody, const QString& jsonMsgType, TypedBase* content) : RoomEvent(typeId(), matrixTypeId(), - toMsgJson(plainBody, jsonMsgType, content)) + assembleContentJson(plainBody, jsonMsgType, content)) , _content(content) { } |