|
|
|
@ -12,6 +12,6 @@ import org.json.JSONObject;
@@ -12,6 +12,6 @@ import org.json.JSONObject;
|
|
|
|
|
*/ |
|
|
|
|
public record Attachment(URL url, String mime) { |
|
|
|
|
public JSONObject json() { |
|
|
|
|
return new JSONObject(Map.of("url", url.toString(), "mime", mime)); |
|
|
|
|
return new JSONObject(Map.of("url", url.toString(), "mime", mime == null ? "content/unknown" : mime)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|