Interface CreateChannelListener
-
- All Implemented Interfaces:
public interface CreateChannelListenerListener for io.getstream.chat.android.client.ChatClient.createChannel calls.
-
-
Method Summary
Modifier and Type Method Description abstract UnitonCreateChannelRequest(String channelType, String channelId, List<String> memberIds, Map<String, Object> extraData, User currentUser)A method called before making an API call to create a channel. abstract UnitonCreateChannelResult(String channelType, String channelId, List<String> memberIds, Result<Channel> result)A method called after receiving the response from the create channel call. abstract Result<Unit>onCreateChannelPrecondition(User currentUser, String channelId, List<String> memberIds)Runs precondition check for ChatClient.createChannel. -
-
Method Detail
-
onCreateChannelRequest
abstract Unit onCreateChannelRequest(String channelType, String channelId, List<String> memberIds, Map<String, Object> extraData, User currentUser)
A method called before making an API call to create a channel.
- Parameters:
channelType- The channel type.channelId- The channel id.memberIds- The list of members' ids.extraData- Map of key-value pairs that let you store extra datacurrentUser- The currently logged in user.
-
onCreateChannelResult
abstract Unit onCreateChannelResult(String channelType, String channelId, List<String> memberIds, Result<Channel> result)
A method called after receiving the response from the create channel call.
- Parameters:
channelType- The channel type.channelId- The channel id.memberIds- The list of members' ids.result- The API call result.
-
onCreateChannelPrecondition
abstract Result<Unit> onCreateChannelPrecondition(User currentUser, String channelId, List<String> memberIds)
Runs precondition check for ChatClient.createChannel. The request will be run if the method returns Result.Success and won't be made if it returns Result.Failure.
- Parameters:
currentUser- The currently logged in user.channelId- The channel id.memberIds- The list of members' ids.- Returns:
Result.Success if the precondition is fulfilled, Result.Failure otherwise.
-
-
-
-