Interface SendReactionListener

    • 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
    • Method Summary

      Modifier and Type Method Description
      abstract Unit onSendReactionRequest(String cid, Reaction reaction, Boolean enforceUnique, User currentUser) A method called before making an API call to send the reaction.
      abstract Unit onSendReactionResult(String cid, Reaction reaction, Boolean enforceUnique, User currentUser, Result<Reaction> result) A method called after receiving the response from the send reaction call.
      abstract Result<Unit> onSendReactionPrecondition(User currentUser, Reaction reaction) Runs precondition check for ChatClient.sendReaction.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • onSendReactionRequest

         abstract Unit onSendReactionRequest(String cid, Reaction reaction, Boolean enforceUnique, User currentUser)

        A method called before making an API call to send the reaction.

        Parameters:
        cid - The full channel id, i.e.
        reaction - The Reaction to send.
        enforceUnique - Flag to determine whether the reaction should replace other ones added by the current user.
        currentUser - The currently logged in user.
      • onSendReactionResult

         abstract Unit onSendReactionResult(String cid, Reaction reaction, Boolean enforceUnique, User currentUser, Result<Reaction> result)

        A method called after receiving the response from the send reaction call.

        Parameters:
        cid - The full channel id, i.e.
        reaction - The Reaction to send.
        enforceUnique - Flag to determine whether the reaction should replace other ones added by the current user.
        currentUser - The currently logged in user.
        result - The API call result.
      • onSendReactionPrecondition

         abstract Result<Unit> onSendReactionPrecondition(User currentUser, Reaction reaction)

        Runs precondition check for ChatClient.sendReaction. 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.
        reaction - The Reaction to send.