mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-27 22:28:29 +00:00
use PartAuthority when fetching part streams
resolves the self-send case Fixes #2259 // FREEBIE
This commit is contained in:
parent
1bb882ac96
commit
b89b986a9e
@ -345,7 +345,7 @@ public class PartDatabase extends Database {
|
|||||||
return writePartData(masterSecret, part, new ByteArrayInputStream(part.getData()));
|
return writePartData(masterSecret, part, new ByteArrayInputStream(part.getData()));
|
||||||
} else if (part.getDataUri() != null) {
|
} else if (part.getDataUri() != null) {
|
||||||
Log.w(TAG, "Writing part data from URI");
|
Log.w(TAG, "Writing part data from URI");
|
||||||
InputStream in = context.getContentResolver().openInputStream(part.getDataUri());
|
InputStream in = PartAuthority.getPartStream(context, masterSecret, part.getDataUri());
|
||||||
return writePartData(masterSecret, part, in);
|
return writePartData(masterSecret, part, in);
|
||||||
} else {
|
} else {
|
||||||
throw new MmsException("Part is empty!");
|
throw new MmsException("Part is empty!");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user