Skip to content

Commit 3456c1d

Browse files
author
Max Klyga
committed
Version 3.1.4
* Fix reaction filtering by kind
1 parent 9eceef7 commit 3456c1d

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
}
1010

1111
group 'io.getstream.client'
12-
version = '3.1.3'
12+
version = '3.1.4'
1313

1414
dependencies {
1515
testCompile 'org.junit.jupiter:junit-jupiter-api:5.3.1'

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,9 @@ public CompletableFuture<List<Reaction>> filter(Token token, LookupKind lookup,
6767
checkNotNull(kind, "Kind can't be null");
6868

6969
try {
70-
final URL url = buildReactionsURL(baseURL, lookup.getKind() + '/' + id + '/');
71-
RequestOption reactionType = new CustomQueryParameter("kind", kind);
70+
final URL url = buildReactionsURL(baseURL, lookup.getKind() + '/' + id + '/' + kind);
7271
RequestOption withActivityData = new CustomQueryParameter("with_activity_data", Boolean.toString(lookup == LookupKind.ACTIVITY_WITH_DATA));
73-
return httpClient.execute(buildGet(url, key, token, filter, limit, reactionType, withActivityData))
72+
return httpClient.execute(buildGet(url, key, token, filter, limit, withActivityData))
7473
.thenApply(response -> {
7574
try {
7675
return deserializeContainer(response, Reaction.class);

src/test/java/io/getstream/client/ReactionsClientTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ void filter() {
4343

4444
client.reactions().add("john-doe", "like", activity.getID()).join();
4545

46-
result[0] = client.reactions().filter(LookupKind.ACTIVITY_WITH_DATA, activity.getID()).join();
46+
client.reactions().filter(LookupKind.ACTIVITY, activity.getID()).join();
47+
48+
result[0] = client.reactions().filter(LookupKind.ACTIVITY_WITH_DATA, activity.getID(), "comment").join();
4749
});
4850
}
4951

0 commit comments

Comments
 (0)