Skip to content

Commit dba3f13

Browse files
authored
Merge pull request #162 from GetStream/flag_custom_var
[FEEDS-42]pass custom var to request
2 parents 0899eb9 + 99ea58e commit dba3f13

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/main/java/io/getstream/client/ModerationClient.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,30 @@ public class ModerationClient {
2323
}
2424

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

3030
public CompletableFuture<Response> flagActivity(
31-
String entityId, String reportingUser, String reason, Map<String, Object> options)
31+
String entityId, String reportingUser, String reason, Map<String, Object> custom)
3232
throws StreamException {
33-
return flag("stream:feeds:v2:activity", entityId, reportingUser, reason, options);
33+
return flag("stream:feeds:v2:activity", entityId, reportingUser, reason, custom);
3434
}
3535

3636
public CompletableFuture<Response> flagReaction(
37-
String entityId, String reportingUser, String reason, Map<String, Object> options)
37+
String entityId, String reportingUser, String reason, Map<String, Object> custom)
3838
throws StreamException {
39-
return flag("stream:feeds:v2:reaction", entityId, reportingUser, reason, options);
39+
return flag("stream:feeds:v2:reaction", entityId, reportingUser, reason, custom);
4040
}
4141

4242
private CompletableFuture<Response> flag(
4343
String entityType,
4444
String entityId,
4545
String reportingUser,
4646
String reason,
47-
Map<String, Object> options)
47+
Map<String, Object> custom)
4848
throws StreamException {
4949
final Token token = buildModerationToken(secret, Auth.TokenAction.WRITE);
50-
return mod.flag(token, entityType, entityId, reportingUser, reason, options);
50+
return mod.flag(token, entityType, entityId, reportingUser, reason, custom);
5151
}
5252
}

src/main/java/io/getstream/core/Moderation.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public CompletableFuture<Response> flag(
3333
String entityId,
3434
String reportingUser,
3535
String Reason,
36-
Map<String, Object> options)
36+
Map<String, Object> Custom)
3737
throws StreamException {
3838
try {
3939
final byte[] payload =
@@ -43,6 +43,7 @@ public CompletableFuture<Response> flag(
4343
public final String entity_type = entityType;
4444
public final String entity_id = entityId;
4545
public final String reason = Reason;
46+
public final Map<String, Object> custom = Custom;
4647
});
4748

4849
final URL url = buildModerationFlagURL(baseURL);

0 commit comments

Comments
 (0)