mirror of
https://codeberg.org/monocles/monocles_chat.git
synced 2025-01-29 00:14:12 +01:00
fix up
This commit is contained in:
parent
5161cda963
commit
be7917323d
1 changed files with 6 additions and 11 deletions
|
@ -795,17 +795,12 @@ public class FileBackend {
|
|||
if ("ogg".equals(extension) && type != null && type.startsWith("audio/")) {
|
||||
extension = "oga";
|
||||
}
|
||||
try {
|
||||
String filename = "Sent" + File.separator + fileDateFormat.format(new Date(message.getTimeSent())) + "_" + message.getUuid().substring(0, 4);
|
||||
setupRelativeFilePath(message, String.format("%s.%s", filename, extension));
|
||||
copyFileToPrivateStorage(mXmppConnectionService.getFileBackend().getFile(message), uri);
|
||||
final String name = getDisplayNameFromUri(uri);
|
||||
if (name != null) {
|
||||
message.getFileParams().setName(name);
|
||||
}
|
||||
} catch (final XmppConnectionService.BlockedMediaException e) {
|
||||
message.setRelativeFilePath(null);
|
||||
message.setDeleted(true);
|
||||
String filename = "Sent" + File.separator + fileDateFormat.format(new Date(message.getTimeSent())) + "_" + message.getUuid().substring(0, 4);
|
||||
setupRelativeFilePath(message, String.format("%s.%s", filename, extension));
|
||||
copyFileToPrivateStorage(mXmppConnectionService.getFileBackend().getFile(message), uri);
|
||||
final String name = getDisplayNameFromUri(uri);
|
||||
if (name != null) {
|
||||
message.getFileParams().setName(name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue