mirror of
https://github.com/rhysd/Mstdn.git
synced 2025-02-02 06:52:13 +01:00
do not see protocol scheme for partitions
This commit is contained in:
parent
5429c0150c
commit
da55de25d1
@ -4,7 +4,13 @@ import log from './log';
|
|||||||
import {Account} from './config';
|
import {Account} from './config';
|
||||||
|
|
||||||
export function partitionForAccount(account: Account) {
|
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 {
|
export default class AccountSwitcher extends EventEmitter {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user