forked from mirror/misskey
4e2d802967
* Enhance: “つながりの公開範囲”がフォロー・フォロワー個別設定できるように (#12072) * refactor: crowdin 編集部分のコミットを打ち消し https://github.com/misskey-dev/misskey/pull/12702#issuecomment-1859417158 * refactor: オブジェクトの名前修正 https://github.com/misskey-dev/misskey/pull/12702#issuecomment-1859417158 * fix: 設定項目の説明を削除 名称が具体的になって必要なくなったため https://github.com/misskey-dev/misskey/pull/12702#discussion_r1429932463
25 lines
770 B
TypeScript
25 lines
770 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
import * as Misskey from 'misskey-js';
|
|
import { $i } from '@/account.js';
|
|
|
|
export function isFollowingVisibleForMe(user: Misskey.entities.UserDetailed): boolean {
|
|
if ($i && $i.id === user.id) return true;
|
|
|
|
if (user.followingVisibility === 'private') return false;
|
|
if (user.followingVisibility === 'followers' && !user.isFollowing) return false;
|
|
|
|
return true;
|
|
}
|
|
export function isFollowersVisibleForMe(user: Misskey.entities.UserDetailed): boolean {
|
|
if ($i && $i.id === user.id) return true;
|
|
|
|
if (user.followersVisibility === 'private') return false;
|
|
if (user.followersVisibility === 'followers' && !user.isFollowing) return false;
|
|
|
|
return true;
|
|
}
|