-
public interface DeleteMessageForMeListenerListener for requests of deleting a message for the current user and for the results of such requests.
-
-
Method Summary
Modifier and Type Method Description Result<Unit>onDeleteMessageForMePrecondition(String messageId)Runs precondition check for ChatClient.deleteMessageForMe. UnitonDeleteMessageForMeRequest(String messageId)Method called when a request to delete a message for the current user in the API happens. UnitonDeleteMessageForMeResult(String messageId, Result<Message> result)Method called when a request to delete a message for the current user in the API finishes. -
-
Method Detail
-
onDeleteMessageForMePrecondition
Result<Unit> onDeleteMessageForMePrecondition(String messageId)
Runs precondition check for ChatClient.deleteMessageForMe.
The request proceeds only if the method returns Result.Success; otherwise, it is aborted if it returns Result.Failure.
- Parameters:
messageId- The message id to be deleted.
-
onDeleteMessageForMeRequest
Unit onDeleteMessageForMeRequest(String messageId)
Method called when a request to delete a message for the current user in the API happens.
-
onDeleteMessageForMeResult
Unit onDeleteMessageForMeResult(String messageId, Result<Message> result)
Method called when a request to delete a message for the current user in the API finishes. Use it to update database, update messages or to present an error to the user.
- Parameters:
result- the result of the API call.
-
-
-
-