Skip to content

Commit 69f4266

Browse files
authored
fix: javadoc (#164)
* fix: javadoc * feat: run javadoc on pr * fix: remove prints * feat: add querying for archived channels in tests
1 parent 38c7348 commit 69f4266

File tree

6 files changed

+29
-6
lines changed

6 files changed

+29
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ jobs:
2525
STREAM_SECRET: ${{ secrets.STREAM_SECRET }}
2626
run: |
2727
./gradlew spotlessCheck --no-daemon
28+
./gradlew javadoc --no-daemon
2829
./gradlew jacocoTestReport --no-daemon

src/main/java/io/getstream/chat/java/models/Flag.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ public static QueryFlagReportsRequest queryFlagReports() {
452452
/**
453453
* Creates a review flag report request
454454
*
455+
* @param id the flag report id
455456
* @return the created request
456457
*/
457458
@NotNull

src/main/java/io/getstream/chat/java/models/Moderation.java

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,22 +190,33 @@ protected Call<ConfigGetResponse> generateCall(Client client) {
190190
}
191191

192192
/**
193-
* Creates a get or create request
193+
* Creates an upsert config request
194194
*
195-
* @param type the channel type
196-
* @param id the channel id
195+
* @param key the moderation config key
197196
* @return the created request
198197
*/
199198
@NotNull
200199
public static UpsertConfigRequest upsertConfig(@NotNull String key) {
201200
return new UpsertConfigRequest(key);
202201
}
203202

203+
/**
204+
* Creates a delete config request
205+
*
206+
* @param key the moderation config key
207+
* @return the created request
208+
*/
204209
@NotNull
205210
public static DeleteConfigRequest deleteConfig(@NotNull String key) {
206211
return new DeleteConfigRequest(key);
207212
}
208213

214+
/*
215+
* Creates a get config request
216+
*
217+
* @param key the moderation config key
218+
* @return the created request
219+
*/
209220
@NotNull
210221
public static ConfigGetRequest getConfig(@NotNull String key) {
211222
return new ConfigGetRequest(key);

src/main/java/io/getstream/chat/java/models/UnreadCounts.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ protected Call<UnreadCountsBatchResponse> generateCall(Client client) {
145145
/**
146146
* Creates a get request.
147147
*
148+
* @param userId the user id
148149
* @return the created request
149150
*/
150151
@NotNull

src/main/java/io/getstream/chat/java/models/framework/StreamRequest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public void requestAsync(
4646
* Use custom client implementation to execute requests
4747
*
4848
* @param client the client implementation
49+
* @return the request
4950
*/
5051
public StreamRequest<T> withClient(Client client) {
5152
this.client = client;

src/test/java/io/getstream/chat/java/ChannelTest.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,6 @@ void whenUpdatingChannelMemberPartially_thenIsUpdated() {
446446
.setValue("channel_role", "channel_moderator")
447447
.request());
448448

449-
System.out.println(channelMemberResponse.getMember());
450449
Assertions.assertEquals(
451450
"custom_value", channelMemberResponse.getMember().getAdditionalFields().get("custom_key"));
452451
Assertions.assertEquals(
@@ -494,8 +493,6 @@ void whenPinningAndUnpinningAChannelUsingUnset_thenIsPinnedAndUnpinned() {
494493
() ->
495494
Channel.pin(channel.getType(), channel.getId(), testUserRequestObject.getId())
496495
.request());
497-
System.out.println(channelMemberResponse.getMember());
498-
System.out.println(channelMemberResponse.getMember().getPinnedAt());
499496
Assertions.assertNotNull(channelMemberResponse.getMember().getPinnedAt());
500497

501498
channelMemberResponse =
@@ -519,6 +516,17 @@ void whenArchivingChannel_thenIsArchived() {
519516
.request());
520517
Assertions.assertNotNull(channelMemberResponse.getMember().getArchivedAt());
521518

519+
ChannelListResponse channelListResponse =
520+
Assertions.assertDoesNotThrow(
521+
() ->
522+
Channel.list()
523+
.userId(testUserRequestObject.getId())
524+
.filterCondition("archived", true)
525+
.request());
526+
Assertions.assertEquals(1, channelListResponse.getChannels().size());
527+
Assertions.assertEquals(
528+
channel.getId(), channelListResponse.getChannels().get(0).getChannel().getId());
529+
522530
channelMemberResponse =
523531
Assertions.assertDoesNotThrow(
524532
() ->

0 commit comments

Comments
 (0)