diff options
Diffstat (limited to 'lib/csapi/definitions/push_rule.h')
-rw-r--r-- | lib/csapi/definitions/push_rule.h | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/lib/csapi/definitions/push_rule.h b/lib/csapi/definitions/push_rule.h index 98bd904d..fe6eb0e6 100644 --- a/lib/csapi/definitions/push_rule.h +++ b/lib/csapi/definitions/push_rule.h @@ -4,14 +4,12 @@ #pragma once - - #include "converters.h" -#include "converters.h" -#include <QtCore/QVariant> #include "csapi/definitions/push_condition.h" + #include <QtCore/QJsonObject> +#include <QtCore/QVariant> #include <QtCore/QVector> namespace QMatrixClient @@ -19,7 +17,6 @@ namespace QMatrixClient // Data structures - struct PushRule { /// The actions to perform when this rule is matched. @@ -30,19 +27,20 @@ struct PushRule bool enabled; /// The ID of this rule. QString ruleId; - /// The conditions that must hold true for an event in order for a rule to beapplied to an event. A rule with no conditions always matches. Onlyapplicable to ``underride`` and ``override`` rules. + /// The conditions that must hold true for an event in order for a rule to + /// beapplied to an event. A rule with no conditions always matches. + /// Onlyapplicable to ``underride`` and ``override`` rules. QVector<PushCondition> conditions; - /// The glob-style pattern to match against. Only applicable to ``content``rules. + /// The glob-style pattern to match against. Only applicable to + /// ``content``rules. QString pattern; - - }; -template <> struct JsonObjectConverter<PushRule> +template <> +struct JsonObjectConverter<PushRule> { static void dumpTo(QJsonObject& jo, const PushRule& pod); - static void fillFrom(const QJsonObject& jo, PushRule& pod);}; - - + static void fillFrom(const QJsonObject& jo, PushRule& pod); +}; } // namespace QMatrixClient |