mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-02 04:20:38 +00:00
removed attachmentPath stff
This commit is contained in:
parent
28472cbd60
commit
31da64c986
1 changed files with 1 additions and 17 deletions
|
@ -1,30 +1,15 @@
|
|||
package org.asamk.signal;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.whispersystems.signalservice.api.messages.SignalServiceAttachment;
|
||||
import org.whispersystems.signalservice.api.messages.SignalServiceAttachmentPointer;
|
||||
|
||||
public class JsonAttachment {
|
||||
class JsonAttachment {
|
||||
|
||||
String contentType;
|
||||
String filename;
|
||||
String id;
|
||||
String storagePath;
|
||||
int size;
|
||||
|
||||
// This is a bit of a kludge, but the alternative of getting a reference
|
||||
// to Manager (who knows about the attachmentPath) from somewhere was even worse.
|
||||
static private String attachmentStoragePath = "";
|
||||
|
||||
static public String getAttachmentStoragePath() {
|
||||
return attachmentStoragePath;
|
||||
}
|
||||
|
||||
static public void setAttachmentStoragePath( String p) {
|
||||
attachmentStoragePath = p;
|
||||
}
|
||||
|
||||
JsonAttachment(SignalServiceAttachment attachment) {
|
||||
this.contentType = attachment.getContentType();
|
||||
|
||||
|
@ -37,7 +22,6 @@ public class JsonAttachment {
|
|||
if (pointer.getSize().isPresent()) {
|
||||
this.size = pointer.getSize().get();
|
||||
}
|
||||
this.storagePath = attachmentStoragePath + File.separator + this.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue