fix: default visibility-score to public
This commit is contained in:
parent
549324a900
commit
2dcb681426
1 changed files with 1 additions and 2 deletions
|
@ -147,11 +147,10 @@ let imeText = $ref('');
|
|||
// TODO: compat with misskey-js, should likely be moved into foundkey-js
|
||||
const visibilityScore = (a: string): string => {
|
||||
switch (a) {
|
||||
case 'public': return 3;
|
||||
case 'home': return 2;
|
||||
case 'followers': return 1;
|
||||
case 'specified': return 0;
|
||||
default: return 4; // invalid visiblity = always considered "too high"
|
||||
default: return 3; // includes public
|
||||
}
|
||||
};
|
||||
const minVisibility = (a: string, b: string): string => visibilityScore(b) > visibilityScore(a) ? a : b;
|
||||
|
|
Loading…
Reference in a new issue