[NEW] Add Endpoints for Owner, leader, moderator of a group/channel - #235
Conversation
|
@filipedelimabrito Can you please review this PR. Required for a PR in RC.Android |
philipbrito
left a comment
There was a problem hiding this comment.
@shubhsherl Can you work on the suggestions made here?
| /* Add owner of a Channel/Group | ||
| * @param roomId Id of the room. | ||
| * @param roomType The type of the room. | ||
| */ |
There was a problem hiding this comment.
To be completely documented, it is missing the @param for userId used here.
| * @param roomId Id of the room. | ||
| * @param roomType The type of the room. | ||
| */ | ||
| suspend fun RocketChatClient.addLeader(roomId: String ,roomType: RoomType, userId: String) { |
There was a problem hiding this comment.
To be completely documented, it is missing the @param for userId used here.
| * @param roomId Id of the room. | ||
| * @param roomType The type of the room. | ||
| */ | ||
| suspend fun RocketChatClient.addModerator(roomId: String ,roomType: RoomType, userId: String) { |
There was a problem hiding this comment.
To be completely documented, it is missing the @param for userId used here.
| * @param roomId Id of the room. | ||
| * @param roomType The type of the room. | ||
| */ | ||
| suspend fun RocketChatClient.removeOwner(roomId: String ,roomType: RoomType, userId: String) { |
There was a problem hiding this comment.
To be completely documented, it is missing the @param for userId used here.
| * @param roomId Id of the room. | ||
| * @param roomType The type of the room. | ||
| */ | ||
| suspend fun RocketChatClient.removeLeader(roomId: String ,roomType: RoomType, userId: String) { |
There was a problem hiding this comment.
To be completely documented, it is missing the @param for userId used here.
| * @param roomId Id of the room. | ||
| * @param roomType The type of the room. | ||
| */ | ||
| suspend fun RocketChatClient.removeModerator(roomId: String ,roomType: RoomType, userId: String) { |
There was a problem hiding this comment.
To be completely documented, it is missing the @param for userId used here.
| * Ignore User | ||
| * @param roomId Id of the room. | ||
| * @param userId Id of user to remove from room. | ||
| * @param ignore user. |
There was a problem hiding this comment.
I believe we can improve the documentation here.
| * @param userId Id of user to remove from room. | ||
| * @param ignore user. | ||
| */ | ||
| suspend fun RocketChatClient.ignoreUser(roomId: String , userId: String, ignore: Boolean = true): Boolean = |
There was a problem hiding this comment.
I think we can move this function to ChatRoom class. Actually there is no reason to keep ChatRoom.kt and Channel.kt on our code. ChatRoom.kt is enough.
| data class ChatRoomUserIgnorePayload(@Json(name = "rid") val roomId: String, val userId: String, val ignore: Boolean) | ||
|
|
||
| @JsonSerializable | ||
| data class ChatRoomUserPayload(val roomId: String, val userId: String) |
There was a problem hiding this comment.
Isn't the json name for the roomId parameter rid?
| data class ChatRoomUserPayload(val roomId: String, val userId: String) | ||
|
|
||
| @JsonSerializable | ||
| data class ChatRoomNamePayload(val roomId: String, val name: String?) |
There was a problem hiding this comment.
Isn't the json name for the roomId parameter rid?
philipbrito
left a comment
There was a problem hiding this comment.
Thanks for sending this PR @shubhsherl. I have fixed the requested changes here.
Add Endpoints for Add/Delete Owner, Leader and Moderator of a group/channel.