Interface CreateChannelListener

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • 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 data
        currentUser - 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.