aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-02-12 07:55:15 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-02-15 07:47:13 +0900
commit52dcb27e1c19389bd833c93609910483ea3be549 (patch)
treedd1fe016016c8d95627f15a8c0dedf5db8298fb5
parent1c83d54f705ad786e4a27aaab94e3a0af725a07c (diff)
downloadlibquotient-52dcb27e1c19389bd833c93609910483ea3be549.tar.gz
libquotient-52dcb27e1c19389bd833c93609910483ea3be549.zip
RoomVersionsCapability: fix naming for 'default' parameter
The same word is used as a predicate in push_rule.yaml and as a noun in capabilities.yaml; fortunately, GTAD gives some means to distinguish the two.
-rw-r--r--lib/csapi/capabilities.cpp2
-rw-r--r--lib/csapi/capabilities.h2
-rw-r--r--lib/csapi/gtad.yaml3
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/csapi/capabilities.cpp b/lib/csapi/capabilities.cpp
index a8e79f6b..bd92cf25 100644
--- a/lib/csapi/capabilities.cpp
+++ b/lib/csapi/capabilities.cpp
@@ -28,7 +28,7 @@ namespace QMatrixClient
{
static void fillFrom(const QJsonObject& jo, GetCapabilitiesJob::RoomVersionsCapability& result)
{
- fromJson(jo.value("default"_ls), result.isDefault);
+ fromJson(jo.value("default"_ls), result.defaultVersion);
fromJson(jo.value("available"_ls), result.available);
}
};
diff --git a/lib/csapi/capabilities.h b/lib/csapi/capabilities.h
index e38483bc..40a2e6f7 100644
--- a/lib/csapi/capabilities.h
+++ b/lib/csapi/capabilities.h
@@ -33,7 +33,7 @@ namespace QMatrixClient
struct RoomVersionsCapability
{
/// The default room version the server is using for new rooms.
- QString isDefault;
+ QString defaultVersion;
/// A detailed description of the room versions the server supports.
QHash<QString, QString> available;
};
diff --git a/lib/csapi/gtad.yaml b/lib/csapi/gtad.yaml
index 21a59a5c..a44f803a 100644
--- a/lib/csapi/gtad.yaml
+++ b/lib/csapi/gtad.yaml
@@ -5,7 +5,8 @@ analyzer:
identifiers:
signed: signedData
unsigned: unsignedData
- default: isDefault
+ PushRule/default: isDefault
+ default: defaultVersion # getCapabilities/RoomVersionsCapability
origin_server_ts: originServerTimestamp # Instead of originServerTs
start: begin # Because start() is a method in BaseJob
m.upload.size: uploadSize