Compare commits
No commits in common. "dc32071529acb565321a8d23ebd2c2a3b8184a8f" and "7fea10f4dc996ce6d7a92592484a9b001c200416" have entirely different histories.
dc32071529
...
7fea10f4dc
2 changed files with 7 additions and 2 deletions
|
@ -248,7 +248,13 @@ public class DatabaseController {
|
|||
// Handle messages containing a file
|
||||
String filePath = "NULL";
|
||||
if (message instanceof FileMessage) {
|
||||
filePath = "'" + ((FileMessage) message).getPath() + "'";
|
||||
try {
|
||||
filePath = "'" + ((FileMessage) message).storeFile() + "'";
|
||||
} catch (IOException e) {
|
||||
Log.e(getClass().getSimpleName(), "Error while saving the file", e);
|
||||
errorCallback.onError(e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
String recipientId = message.getRecipient().id;
|
||||
|
|
|
@ -66,7 +66,6 @@ public class PeerUser extends User implements Comparable<PeerUser> {
|
|||
"Sending file message to " + this.getUsername() + " / " + this.getId() + ": " + msg);
|
||||
try {
|
||||
final FileMessage message = new FileMessage(CurrentUser.getInstance(), this, new Date(), msg, file.getPath());
|
||||
message.storeFile();
|
||||
connection.send(message, () -> history.addMessage(message, errorCallback), errorCallback);
|
||||
} catch (IOException e) {
|
||||
Log.e(this.getClass().getSimpleName(), "Could not send message: error while opening file", e);
|
||||
|
|
Loading…
Reference in a new issue