requestMediaDownload method

Future<void> requestMediaDownload(
  1. String messageId
)

Manually requests download of a media file.

Queue a manual media download and immediately try to fetch it.

Implementation

Future<void> requestMediaDownload(String messageId) async {
  await _db.updateMediaAvailability(
    messageId,
    MediaAvailability.manualDownloadRequested,
  );
  _log('Queued manual media download for message $messageId');

  // Trigger a sync to try to fetch the file immediately
  triggerImmediateSync();
}