getClientInstanceKey static method

String getClientInstanceKey({
  1. required String baseUrl,
  2. required String inboxIdentifier,
  3. String? userIdentifier,
})

Create a ruut client instance key using the ruut client instance baseurl, inboxIdentifier and userIdentifier. Client instance keys are used to differentiate between client instances and their data (contact (RuutContact),conversation (RuutConversation) and messages (RuutMessage))

Create separate RuutClient instances with same baseUrl, inboxIdentifier, userIdentifier and persistence enabled will be regarded as same therefore use same contact and conversation.

Implementation

static String getClientInstanceKey(
    {required String baseUrl,
    required String inboxIdentifier,
    String? userIdentifier}) {
  return "$baseUrl$_keySeparator$userIdentifier$_keySeparator$inboxIdentifier";
}