diff options
Diffstat (limited to 'lib/csapi/definitions/push_rule.cpp')
-rw-r--r-- | lib/csapi/definitions/push_rule.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/csapi/definitions/push_rule.cpp b/lib/csapi/definitions/push_rule.cpp index bfa8a7ef..fc2be2c7 100644 --- a/lib/csapi/definitions/push_rule.cpp +++ b/lib/csapi/definitions/push_rule.cpp @@ -4,10 +4,8 @@ #include "push_rule.h" - using namespace QMatrixClient; - void JsonObjectConverter<PushRule>::dumpTo(QJsonObject& jo, const PushRule& pod) { addParam<>(jo, QStringLiteral("actions"), pod.actions); @@ -16,10 +14,10 @@ void JsonObjectConverter<PushRule>::dumpTo(QJsonObject& jo, const PushRule& pod) addParam<>(jo, QStringLiteral("rule_id"), pod.ruleId); addParam<IfNotEmpty>(jo, QStringLiteral("conditions"), pod.conditions); addParam<IfNotEmpty>(jo, QStringLiteral("pattern"), pod.pattern); - } - -void JsonObjectConverter<PushRule>::fillFrom(const QJsonObject& jo, PushRule& result) + +void JsonObjectConverter<PushRule>::fillFrom(const QJsonObject& jo, + PushRule& result) { fromJson(jo.value("actions"_ls), result.actions); fromJson(jo.value("default"_ls), result.isDefault); @@ -27,8 +25,4 @@ void JsonObjectConverter<PushRule>::fillFrom(const QJsonObject& jo, PushRule& re fromJson(jo.value("rule_id"_ls), result.ruleId); fromJson(jo.value("conditions"_ls), result.conditions); fromJson(jo.value("pattern"_ls), result.pattern); - } - - - |