-
Notifications
You must be signed in to change notification settings - Fork 260
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
Add ban/unban user #87
Conversation
…o feature/ban_user
…o feature/ban_user
…o feature/ban_user # Conflicts: # library/src/main/java/com/getstream/sdk/chat/model/Channel.java # library/src/main/java/com/getstream/sdk/chat/rest/core/Client.java # library/src/main/java/com/getstream/sdk/chat/viewmodel/ChannelViewModel.java
@@ -83,6 +84,12 @@ | |||
|
|||
@POST("/moderation/unflag") | |||
Call<FlagResponse> unFlag(@Query("api_key") String apiKey, @Query("user_id") String userId, @Query("client_id") String connectionId, @Body Map<String, String> body); | |||
|
|||
@POST("/moderation/ban") | |||
Call<CompletableResponse> banUser(@Query("api_key") String apiKey, @Query("client_id") String connectionId, @Body BanUserRequest body); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bevzaanton feel free to replace other endpoints' Completable that have no data with CompletableResponse
less code is always better :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I will do it my next PR
…oken [CAS-277] Feature/disable send firebase token
[CAS-315] Rename directories to avoid conflict when merge different repositories
Submit a pull request
Description of the pull request
Client
to ban/unban userChannel
to ban/unban user for this channelMethods for end-client:
ChannelViewModel
public void banUser(@NotNull String targetUserId, @Nullable String reason, @Nullable Integer timeout, @Nullable ResultCallback<Void, String> callback)
- bans a user from this channelpublic void unBanUser(@NotNull String targetUserId, @Nullable ResultCallback<Void, String> callback)
- removes the ban for a user on this channel