Skip to content
Merged
Show file tree
Hide file tree
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
16 changes: 8 additions & 8 deletions src/main/java/io/getstream/client/ModerationClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,30 @@ public class ModerationClient {
}

public CompletableFuture<Response> flagUser(
String flaggedUserId,String reportingUser, String reason, Map<String, Object> options) throws StreamException {
return flag("stream:user", flaggedUserId, reportingUser, reason, options);
String flaggedUserId,String reportingUser, String reason, Map<String, Object> custom) throws StreamException {
return flag("stream:user", flaggedUserId, reportingUser, reason, custom);
}

public CompletableFuture<Response> flagActivity(
String entityId, String reportingUser, String reason, Map<String, Object> options)
String entityId, String reportingUser, String reason, Map<String, Object> custom)
throws StreamException {
return flag("stream:feeds:v2:activity", entityId, reportingUser, reason, options);
return flag("stream:feeds:v2:activity", entityId, reportingUser, reason, custom);
}

public CompletableFuture<Response> flagReaction(
String entityId, String reportingUser, String reason, Map<String, Object> options)
String entityId, String reportingUser, String reason, Map<String, Object> custom)
throws StreamException {
return flag("stream:feeds:v2:reaction", entityId, reportingUser, reason, options);
return flag("stream:feeds:v2:reaction", entityId, reportingUser, reason, custom);
}

private CompletableFuture<Response> flag(
String entityType,
String entityId,
String reportingUser,
String reason,
Map<String, Object> options)
Map<String, Object> custom)
throws StreamException {
final Token token = buildModerationToken(secret, Auth.TokenAction.WRITE);
return mod.flag(token, entityType, entityId, reportingUser, reason, options);
return mod.flag(token, entityType, entityId, reportingUser, reason, custom);
}
}
3 changes: 2 additions & 1 deletion src/main/java/io/getstream/core/Moderation.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public CompletableFuture<Response> flag(
String entityId,
String reportingUser,
String Reason,
Map<String, Object> options)
Map<String, Object> Custom)
throws StreamException {
try {
final byte[] payload =
Expand All @@ -43,6 +43,7 @@ public CompletableFuture<Response> flag(
public final String entity_type = entityType;
public final String entity_id = entityId;
public final String reason = Reason;
public final Map<String, Object> custom = Custom;
});

final URL url = buildModerationFlagURL(baseURL);
Expand Down
Loading