aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-07-24 08:29:35 +0200
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-07-24 08:29:35 +0200
commitd1c5e514fb65bbea182b34a893bca12b321e3bac (patch)
tree06c8ef77eb4203c49804650eeca76e0b1d3a54d5 /lib
parente9237a46bbdf6cbfee23c4f1acc06d90251566b0 (diff)
downloadlibquotient-d1c5e514fb65bbea182b34a893bca12b321e3bac.tar.gz
libquotient-d1c5e514fb65bbea182b34a893bca12b321e3bac.zip
csapi/: refresh from the latest matrix-doc
Diffstat (limited to 'lib')
-rw-r--r--lib/csapi/logout.h11
-rw-r--r--lib/csapi/pushrules.cpp5
-rw-r--r--lib/csapi/pushrules.h9
3 files changed, 14 insertions, 11 deletions
diff --git a/lib/csapi/logout.h b/lib/csapi/logout.h
index e9a7ef89..78f14e40 100644
--- a/lib/csapi/logout.h
+++ b/lib/csapi/logout.h
@@ -34,11 +34,12 @@ public:
* devices for the user are also deleted. `Device keys <#device-keys>`_ for the
* device are deleted alongside the device.
*
- * This endpoint does not require UI authorization because UI authorization is
- * designed to protect against attacks where the someone gets hold of a single
- * access token then takes over the account. This endpoint invalidates all
- * access tokens for the user, including the token used in the request, and
- * therefore the attacker is unable to take over the account in this way.
+ * This endpoint does not use the `User-Interactive Authentication API`_ because
+ * User-Interactive Authentication is designed to protect against attacks where
+ * the someone gets hold of a single access token then takes over the account.
+ * This endpoint invalidates all access tokens for the user, including the token
+ * used in the request, and therefore the attacker is unable to take over the
+ * account in this way.
*/
class LogoutAllJob : public BaseJob {
public:
diff --git a/lib/csapi/pushrules.cpp b/lib/csapi/pushrules.cpp
index f2a16f1b..86165744 100644
--- a/lib/csapi/pushrules.cpp
+++ b/lib/csapi/pushrules.cpp
@@ -64,7 +64,8 @@ auto queryToSetPushRule(const QString& before, const QString& after)
}
SetPushRuleJob::SetPushRuleJob(const QString& scope, const QString& kind,
- const QString& ruleId, const QStringList& actions,
+ const QString& ruleId,
+ const QVector<QVariant>& actions,
const QString& before, const QString& after,
const QVector<PushCondition>& conditions,
const QString& pattern)
@@ -135,7 +136,7 @@ GetPushRuleActionsJob::GetPushRuleActionsJob(const QString& scope,
SetPushRuleActionsJob::SetPushRuleActionsJob(const QString& scope,
const QString& kind,
const QString& ruleId,
- const QStringList& actions)
+ const QVector<QVariant>& actions)
: BaseJob(HttpVerb::Put, QStringLiteral("SetPushRuleActionsJob"),
QStringLiteral("/_matrix/client/r0") % "/pushrules/" % scope % "/"
% kind % "/" % ruleId % "/actions")
diff --git a/lib/csapi/pushrules.h b/lib/csapi/pushrules.h
index f6d3458a..1c6d5c2d 100644
--- a/lib/csapi/pushrules.h
+++ b/lib/csapi/pushrules.h
@@ -148,7 +148,8 @@ public:
* against.
*/
explicit SetPushRuleJob(const QString& scope, const QString& kind,
- const QString& ruleId, const QStringList& actions,
+ const QString& ruleId,
+ const QVector<QVariant>& actions,
const QString& before = {},
const QString& after = {},
const QVector<PushCondition>& conditions = {},
@@ -246,9 +247,9 @@ public:
// Result properties
/// The action(s) to perform for this rule.
- QStringList actions() const
+ QVector<QVariant> actions() const
{
- return loadFromJson<QStringList>("actions"_ls);
+ return loadFromJson<QVector<QVariant>>("actions"_ls);
}
};
@@ -275,7 +276,7 @@ public:
*/
explicit SetPushRuleActionsJob(const QString& scope, const QString& kind,
const QString& ruleId,
- const QStringList& actions);
+ const QVector<QVariant>& actions);
};
} // namespace Quotient