getMessagesWithPendingMedia method
Returns messages with media that are pending download.
Used by the sync engine to decide which media files to request from peers during Phase 3.
Implementation
Future<List<Message>> getMessagesWithPendingMedia() {
return (select(messages)
..where((t) => t.mediaAvailability.equals(
MediaAvailability.pendingDownload.value)))
.get();
}