Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: javadoc #164

Merged
merged 4 commits into from
Dec 13, 2024
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ jobs:
STREAM_SECRET: ${{ secrets.STREAM_SECRET }}
run: |
./gradlew spotlessCheck --no-daemon
./gradlew javadoc --no-daemon
./gradlew jacocoTestReport --no-daemon
1 change: 1 addition & 0 deletions src/main/java/io/getstream/chat/java/models/Flag.java
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ public static QueryFlagReportsRequest queryFlagReports() {
/**
* Creates a review flag report request
*
* @param id the flag report id
* @return the created request
*/
@NotNull
Expand Down
17 changes: 14 additions & 3 deletions src/main/java/io/getstream/chat/java/models/Moderation.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,22 +190,33 @@ protected Call<ConfigGetResponse> generateCall(Client client) {
}

/**
* Creates a get or create request
* Creates an upsert config request
*
* @param type the channel type
* @param id the channel id
* @param key the moderation config key
* @return the created request
*/
@NotNull
public static UpsertConfigRequest upsertConfig(@NotNull String key) {
return new UpsertConfigRequest(key);
}

/**
* Creates a delete config request
*
* @param key the moderation config key
* @return the created request
*/
@NotNull
public static DeleteConfigRequest deleteConfig(@NotNull String key) {
return new DeleteConfigRequest(key);
}

/*
* Creates a get config request
*
* @param key the moderation config key
* @return the created request
*/
@NotNull
public static ConfigGetRequest getConfig(@NotNull String key) {
return new ConfigGetRequest(key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ protected Call<UnreadCountsBatchResponse> generateCall(Client client) {
/**
* Creates a get request.
*
* @param userId the user id
* @return the created request
*/
@NotNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public void requestAsync(
* Use custom client implementation to execute requests
*
* @param client the client implementation
* @return the request
*/
public StreamRequest<T> withClient(Client client) {
this.client = client;
Expand Down
14 changes: 11 additions & 3 deletions src/test/java/io/getstream/chat/java/ChannelTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,6 @@ void whenUpdatingChannelMemberPartially_thenIsUpdated() {
.setValue("channel_role", "channel_moderator")
.request());

System.out.println(channelMemberResponse.getMember());
Assertions.assertEquals(
"custom_value", channelMemberResponse.getMember().getAdditionalFields().get("custom_key"));
Assertions.assertEquals(
Expand Down Expand Up @@ -494,8 +493,6 @@ void whenPinningAndUnpinningAChannelUsingUnset_thenIsPinnedAndUnpinned() {
() ->
Channel.pin(channel.getType(), channel.getId(), testUserRequestObject.getId())
.request());
System.out.println(channelMemberResponse.getMember());
System.out.println(channelMemberResponse.getMember().getPinnedAt());
Assertions.assertNotNull(channelMemberResponse.getMember().getPinnedAt());

channelMemberResponse =
Expand All @@ -519,6 +516,17 @@ void whenArchivingChannel_thenIsArchived() {
.request());
Assertions.assertNotNull(channelMemberResponse.getMember().getArchivedAt());

ChannelListResponse channelListResponse =
Assertions.assertDoesNotThrow(
() ->
Channel.list()
.userId(testUserRequestObject.getId())
.filterCondition("archived", true)
.request());
Assertions.assertEquals(1, channelListResponse.getChannels().size());
Assertions.assertEquals(
channel.getId(), channelListResponse.getChannels().get(0).getChannel().getId());

channelMemberResponse =
Assertions.assertDoesNotThrow(
() ->
Expand Down
Loading