Properly check attachment size during media send.

Prevent users from trying to send videos that exceed the size limit.

Also, this commit properly populates height/width on media shared into
the app.

Fixes #8573
This commit is contained in:
Greyson Parrelli
2019-02-11 15:05:37 -08:00
parent a3768c7d74
commit 6896f8ea15
10 changed files with 169 additions and 25 deletions

View File

@@ -105,6 +105,7 @@ public class MediaPreviewViewModel extends ViewModel {
mediaRecord.getDate(),
mediaRecord.getAttachment().getWidth(),
mediaRecord.getAttachment().getHeight(),
mediaRecord.getAttachment().getSize(),
Optional.absent(),
Optional.fromNullable(mediaRecord.getAttachment().getCaption()));
}