getMessagePosition

open fun getMessagePosition(@NonNull context: Context, @NonNull messageId: String): Int

Call this method to retrieve the message position in the associated conversation from local Database.

Return

The message position in the associated conversation or : 0 in case of the given message is the first one in the associated conversation or

  • -1
  • in case of
  • given message does not exist
  • associated conversation does not exist

Parameters

context

The application context

messageId

The message id