Merge branch 'mini_fixes' into 'master'
Mini fixes See merge request famedly/famedlysdk!34
This commit is contained in:
commit
4f68be16e8
|
@ -243,7 +243,7 @@ class Client {
|
|||
Future<PushrulesResponse> getPushrules() async {
|
||||
final dynamic resp = await connection.jsonRequest(
|
||||
type: HTTPType.GET,
|
||||
action: "/client/r0/pushrules",
|
||||
action: "/client/r0/pushrules/",
|
||||
);
|
||||
|
||||
if (resp is ErrorResponse) {
|
||||
|
|
|
@ -55,7 +55,7 @@ class Store {
|
|||
_init() async {
|
||||
var databasePath = await getDatabasesPath();
|
||||
String path = p.join(databasePath, "FluffyMatrix.db");
|
||||
_db = await openDatabase(path, version: 5,
|
||||
_db = await openDatabase(path, version: 6,
|
||||
onCreate: (Database db, int version) async {
|
||||
await createTables(db);
|
||||
}, onUpgrade: (Database db, int oldVersion, int newVersion) async {
|
||||
|
@ -100,6 +100,7 @@ class Store {
|
|||
await db.execute(RoomsScheme);
|
||||
await db.execute(UserScheme);
|
||||
await db.execute(EventsScheme);
|
||||
await db.execute(NotificationsCacheScheme);
|
||||
}
|
||||
|
||||
Future<String> queryPrevBatch() async {
|
||||
|
@ -716,7 +717,7 @@ class Store {
|
|||
'UNIQUE(chat_id, matrix_id))';
|
||||
|
||||
/// 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(' +
|
||||
'chat_id TEXT, ' + // The chat id
|
||||
'event_id TEXT, ' + // The matrix id of the Event
|
||||
'UNIQUE(event_id))';
|
||||
|
|
|
@ -244,7 +244,7 @@ void main() {
|
|||
test('getPushrules', () async {
|
||||
final PushrulesResponse pushrules = await matrix.getPushrules();
|
||||
final PushrulesResponse awaited_resp = PushrulesResponse.fromJson(
|
||||
FakeMatrixApi.api["GET"]["/client/r0/pushrules"](""));
|
||||
FakeMatrixApi.api["GET"]["/client/r0/pushrules/"](""));
|
||||
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": {
|
||||
"content": [
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue