Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions src/main/java/io/getstream/chat/java/models/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ public class Message {
@JsonProperty("member")
private ChannelMember member;

@Nullable
@JsonProperty("moderation")
private ModerationV2Response moderation;

@NotNull @JsonIgnore private Map<String, Object> additionalFields = new HashMap<>();

@JsonAnyGetter
Expand Down Expand Up @@ -415,6 +419,46 @@ public static class Moderation {
private Integer spam;
}

@Data
@NoArgsConstructor
public static class ModerationV2Response {
@Nullable
@JsonProperty("action")
private String action;

@Nullable
@JsonProperty("original_text")
private String originalText;

@Nullable
@JsonProperty("text_harms")
private List<String> textHarms;

@Nullable
@JsonProperty("image_harms")
private List<String> imageHarms;

/**
* @deprecated Use {@link #blocklistsMatched} instead. Kept for backward compatibility.
*/
@Deprecated
@Nullable
@JsonProperty("blocklist_matched")
private String blocklistMatched;

@Nullable
@JsonProperty("blocklists_matched")
private List<String> blocklistsMatched;

@Nullable
@JsonProperty("semantic_filter_matched")
private String semanticFilterMatched;

@Nullable
@JsonProperty("platform_circumvented")
private Boolean platformCircumvented;
}

@Builder
@Setter
@Getter
Expand Down