parent
480d4ad904
commit
13b5462f63
|
@ -14,9 +14,11 @@ import org.parceler.Parcel;
|
|||
import org.parceler.ParcelConstructor;
|
||||
import org.parceler.ParcelProperty;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Parcel
|
||||
public class Attachment extends BaseModel{
|
||||
@RequiredField
|
||||
// @RequiredField
|
||||
public String id;
|
||||
@RequiredField
|
||||
public Type type;
|
||||
|
@ -85,6 +87,12 @@ public class Attachment extends BaseModel{
|
|||
if(placeholder!=null)
|
||||
blurhashPlaceholder=new BlurHashDrawable(placeholder, getWidth(), getHeight());
|
||||
}
|
||||
|
||||
if (id == null) {
|
||||
// akkoma servers doesn't provide IDs for attachments,
|
||||
// but IDs are needed by the AudioPlayerService
|
||||
id = "" + this.hashCode();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue