diff --git a/packages/sds/src/message_channel/persistent_history.ts b/packages/sds/src/message_channel/persistent_history.ts index 1a578554b2..3b198d9edb 100644 --- a/packages/sds/src/message_channel/persistent_history.ts +++ b/packages/sds/src/message_channel/persistent_history.ts @@ -12,7 +12,7 @@ export interface HistoryStorage { export interface PersistentHistoryOptions { channelId: ChannelId; storage?: HistoryStorage; - storageKey?: string; + storageKeyPrefix?: string; } type StoredHistoryEntry = { @@ -46,8 +46,7 @@ export class PersistentHistory implements ILocalHistory { public constructor(options: PersistentHistoryOptions) { this.memory = new MemLocalHistory(); this.storage = options.storage ?? getDefaultHistoryStorage(); - this.storageKey = - options.storageKey ?? `${HISTORY_STORAGE_PREFIX}${options.channelId}`; + this.storageKey = `${HISTORY_STORAGE_PREFIX}${options.storageKeyPrefix}:${options.channelId}`; this.restore(); }