fix(service): Fix wrong type when querying file metadata

This commit is contained in:
PapaTutuWawa 2023-05-08 13:08:25 +02:00
parent 86f7e63f65
commit 39babfbadd
2 changed files with 9 additions and 1 deletions

View File

@ -83,7 +83,7 @@ class FilesService {
final result = await db.query(
fileMetadataTable,
where: 'id = ?',
whereArgs: [hashes[0]['id']! as int],
whereArgs: [hashes[0]['id']! as String],
limit: 1,
);
if (result.isEmpty) {

View File

@ -1439,6 +1439,10 @@ class XmppService {
} else {
// Make sure we create the notification
shouldNotify = true;
if (fileMetadata?.path != null) {
_log.info('Not downloading file as we already have it locally');
}
}
}
@ -1608,6 +1612,10 @@ class XmppService {
shouldShowNotification: false,
),
);
} else {
if (fileMetadata != null) {
_log.info('Not downloading file as we already have it locally');
}
}
} else {
_log.warning(