Merge branch 'master' into 'mini_fixes3'
# Conflicts: # lib/src/Store.dart
This commit is contained in:
commit
88197fed0f
|
@ -243,7 +243,7 @@ class Client {
|
||||||
Future<PushrulesResponse> getPushrules() async {
|
Future<PushrulesResponse> getPushrules() async {
|
||||||
final dynamic resp = await connection.jsonRequest(
|
final dynamic resp = await connection.jsonRequest(
|
||||||
type: HTTPType.GET,
|
type: HTTPType.GET,
|
||||||
action: "/client/r0/pushrules",
|
action: "/client/r0/pushrules/",
|
||||||
);
|
);
|
||||||
|
|
||||||
if (resp is ErrorResponse) {
|
if (resp is ErrorResponse) {
|
||||||
|
|
|
@ -100,6 +100,7 @@ class Store {
|
||||||
await db.execute(RoomsScheme);
|
await db.execute(RoomsScheme);
|
||||||
await db.execute(UserScheme);
|
await db.execute(UserScheme);
|
||||||
await db.execute(EventsScheme);
|
await db.execute(EventsScheme);
|
||||||
|
await db.execute(NotificationsCacheScheme);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> queryPrevBatch() async {
|
Future<String> queryPrevBatch() async {
|
||||||
|
@ -716,7 +717,7 @@ class Store {
|
||||||
'UNIQUE(chat_id, matrix_id))';
|
'UNIQUE(chat_id, matrix_id))';
|
||||||
|
|
||||||
/// The database scheme for the NotificationsCache class.
|
/// The database scheme for the NotificationsCache class.
|
||||||
static final String NotificationsCache = 'CREATE TABLE IF NOT EXISTS NotificationsCache(' +
|
static final String NotificationsCacheScheme = 'CREATE TABLE IF NOT EXISTS NotificationsCache(' +
|
||||||
'id int PRIMARY KEY'
|
'id int PRIMARY KEY'
|
||||||
'chat_id TEXT, ' + // The chat id
|
'chat_id TEXT, ' + // The chat id
|
||||||
'event_id TEXT, ' + // The matrix id of the Event
|
'event_id TEXT, ' + // The matrix id of the Event
|
||||||
|
|
|
@ -244,7 +244,7 @@ void main() {
|
||||||
test('getPushrules', () async {
|
test('getPushrules', () async {
|
||||||
final PushrulesResponse pushrules = await matrix.getPushrules();
|
final PushrulesResponse pushrules = await matrix.getPushrules();
|
||||||
final PushrulesResponse awaited_resp = PushrulesResponse.fromJson(
|
final PushrulesResponse awaited_resp = PushrulesResponse.fromJson(
|
||||||
FakeMatrixApi.api["GET"]["/client/r0/pushrules"](""));
|
FakeMatrixApi.api["GET"]["/client/r0/pushrules/"](""));
|
||||||
expect(pushrules.toJson(), awaited_resp.toJson());
|
expect(pushrules.toJson(), awaited_resp.toJson());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,7 @@ class FakeMatrixApi extends MockClient {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"/client/r0/pushrules": (var req) => {
|
"/client/r0/pushrules/": (var req) => {
|
||||||
"global": {
|
"global": {
|
||||||
"content": [
|
"content": [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue