diff --git a/main/account_switcher.ts b/main/account_switcher.ts index 6620609..4c9fdc2 100644 --- a/main/account_switcher.ts +++ b/main/account_switcher.ts @@ -4,7 +4,13 @@ import log from './log'; import {Account} from './config'; export function partitionForAccount(account: Account) { - return `persist:mstdn:${account.name}:${account.host}`; + let host = account.host; + if (account.host.startsWith('https://')) { + host = host.slice(8); + } else if (account.host.startsWith('http://')) { + host = host.slice(7); + } + return `persist:mstdn:${account.name}:${host}`; } export default class AccountSwitcher extends EventEmitter {