fields #1

Merged
Etzelia merged 1 commits from refs/pull/1/head into master 2021-03-16 01:57:00 +00:00
1 changed files with 1 additions and 2 deletions

View File

@ -109,8 +109,7 @@ public class Embed {
if (thumbnail != null) json.add(String.format("\"thumbnail\": %s", thumbnail.toJSON()));
if (image != null) json.add(String.format("\"image\": %s", image.toJSON()));
if (author != null) json.add(String.format("\"author\": %s", author.toJSON()));
if (fields.size() > 0)
json.add(String.format("\"fields\": [%s]", fields.stream().map(Field::toJSON).collect(Collectors.joining(","))));
if (fields.size() > 0) json.add(String.format("\"fields\": [%s]", fields.stream().map(Field::toJSON).collect(Collectors.joining(","))));
builder.append(String.join(",", json));
return builder.append("}").toString();
}