int getLatestIndex(String participantId) { if (options.sharedKey) { return _latestSharedIndex; } return _latestSetIndex[participantId] ?? 0; }