mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-14 02:07:51 +00:00

committed by
Moxie Marlinspike

parent
cde92256a6
commit
a6488b3652
@@ -63,7 +63,7 @@ public abstract class PushSendJob extends SendJob {
|
|||||||
ContentType.isVideoType(attachment.getContentType()))
|
ContentType.isVideoType(attachment.getContentType()))
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (attachment.getDataUri() == null) throw new IOException("Assertion failed, outgoing attachment has no data!");
|
if (attachment.getDataUri() == null || attachment.getSize() == 0) throw new IOException("Assertion failed, outgoing attachment has no data!");
|
||||||
InputStream is = PartAuthority.getAttachmentStream(context, masterSecret, attachment.getDataUri());
|
InputStream is = PartAuthority.getAttachmentStream(context, masterSecret, attachment.getDataUri());
|
||||||
attachments.add(SignalServiceAttachment.newStreamBuilder()
|
attachments.add(SignalServiceAttachment.newStreamBuilder()
|
||||||
.withStream(is)
|
.withStream(is)
|
||||||
|
Reference in New Issue
Block a user