enhance: “つながりの公開範囲”がフォロー・フォロワー個別設定できるように (#12702)
* 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
This commit is contained in:
parent
f6ff3b1f1a
commit
4e2d802967
23 changed files with 648 additions and 71 deletions
|
@ -26,9 +26,10 @@ describe('FF visibility', () => {
|
|||
await app.close();
|
||||
});
|
||||
|
||||
test('ffVisibility が public なユーザーのフォロー/フォロワーを誰でも見れる', async () => {
|
||||
test('followingVisibility, followersVisibility がともに public なユーザーのフォロー/フォロワーを誰でも見れる', async () => {
|
||||
await api('/i/update', {
|
||||
ffVisibility: 'public',
|
||||
followingVisibility: 'public',
|
||||
followersVisibility: 'public',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
|
@ -44,9 +45,88 @@ describe('FF visibility', () => {
|
|||
assert.strictEqual(Array.isArray(followersRes.body), true);
|
||||
});
|
||||
|
||||
test('ffVisibility が followers なユーザーのフォロー/フォロワーを自分で見れる', async () => {
|
||||
test('followingVisibility が public であれば followersVisibility の設定に関わらずユーザーのフォローを誰でも見れる', async () => {
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'public',
|
||||
followersVisibility: 'public',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followingRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followingRes.body), true);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'public',
|
||||
followersVisibility: 'followers',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followingRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followingRes.body), true);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'public',
|
||||
followersVisibility: 'private',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followingRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followingRes.body), true);
|
||||
}
|
||||
});
|
||||
|
||||
test('followersVisibility が public であれば followingVisibility の設定に関わらずユーザーのフォロワーを誰でも見れる', async () => {
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'public',
|
||||
followersVisibility: 'public',
|
||||
}, alice);
|
||||
|
||||
const followersRes = await api('/users/followers', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followersRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followersRes.body), true);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'followers',
|
||||
followersVisibility: 'public',
|
||||
}, alice);
|
||||
|
||||
const followersRes = await api('/users/followers', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followersRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followersRes.body), true);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'private',
|
||||
followersVisibility: 'public',
|
||||
}, alice);
|
||||
|
||||
const followersRes = await api('/users/followers', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followersRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followersRes.body), true);
|
||||
}
|
||||
});
|
||||
|
||||
test('followingVisibility, followersVisibility がともに followers なユーザーのフォロー/フォロワーを自分で見れる', async () => {
|
||||
await api('/i/update', {
|
||||
ffVisibility: 'followers',
|
||||
followingVisibility: 'followers',
|
||||
followersVisibility: 'followers',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
|
@ -62,9 +142,88 @@ describe('FF visibility', () => {
|
|||
assert.strictEqual(Array.isArray(followersRes.body), true);
|
||||
});
|
||||
|
||||
test('ffVisibility が followers なユーザーのフォロー/フォロワーを非フォロワーが見れない', async () => {
|
||||
test('followingVisibility が followers なユーザーのフォローを followersVisibility の設定に関わらず自分で見れる', async () => {
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'followers',
|
||||
followersVisibility: 'public',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
userId: alice.id,
|
||||
}, alice);
|
||||
assert.strictEqual(followingRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followingRes.body), true);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'followers',
|
||||
followersVisibility: 'followers',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
userId: alice.id,
|
||||
}, alice);
|
||||
assert.strictEqual(followingRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followingRes.body), true);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'followers',
|
||||
followersVisibility: 'private',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
userId: alice.id,
|
||||
}, alice);
|
||||
assert.strictEqual(followingRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followingRes.body), true);
|
||||
}
|
||||
});
|
||||
|
||||
test('followersVisibility が followers なユーザーのフォロワーを followingVisibility の設定に関わらず自分で見れる', async () => {
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'public',
|
||||
followersVisibility: 'followers',
|
||||
}, alice);
|
||||
|
||||
const followersRes = await api('/users/followers', {
|
||||
userId: alice.id,
|
||||
}, alice);
|
||||
assert.strictEqual(followersRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followersRes.body), true);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'followers',
|
||||
followersVisibility: 'followers',
|
||||
}, alice);
|
||||
|
||||
const followersRes = await api('/users/followers', {
|
||||
userId: alice.id,
|
||||
}, alice);
|
||||
assert.strictEqual(followersRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followersRes.body), true);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'private',
|
||||
followersVisibility: 'followers',
|
||||
}, alice);
|
||||
|
||||
const followersRes = await api('/users/followers', {
|
||||
userId: alice.id,
|
||||
}, alice);
|
||||
assert.strictEqual(followersRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followersRes.body), true);
|
||||
}
|
||||
});
|
||||
|
||||
test('followingVisibility, followersVisibility がともに followers なユーザーのフォロー/フォロワーを非フォロワーが見れない', async () => {
|
||||
await api('/i/update', {
|
||||
ffVisibility: 'followers',
|
||||
followingVisibility: 'followers',
|
||||
followersVisibility: 'followers',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
|
@ -78,9 +237,82 @@ describe('FF visibility', () => {
|
|||
assert.strictEqual(followersRes.status, 400);
|
||||
});
|
||||
|
||||
test('ffVisibility が followers なユーザーのフォロー/フォロワーをフォロワーが見れる', async () => {
|
||||
test('followingVisibility が followers なユーザーのフォローを followersVisibility の設定に関わらず非フォロワーが見れない', async () => {
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'followers',
|
||||
followersVisibility: 'public',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followingRes.status, 400);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'followers',
|
||||
followersVisibility: 'followers',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followingRes.status, 400);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'followers',
|
||||
followersVisibility: 'private',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followingRes.status, 400);
|
||||
}
|
||||
});
|
||||
|
||||
test('followersVisibility が followers なユーザーのフォロワーを followingVisibility の設定に関わらず非フォロワーが見れない', async () => {
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'public',
|
||||
followersVisibility: 'followers',
|
||||
}, alice);
|
||||
|
||||
const followersRes = await api('/users/followers', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followersRes.status, 400);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'followers',
|
||||
followersVisibility: 'followers',
|
||||
}, alice);
|
||||
|
||||
const followersRes = await api('/users/followers', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followersRes.status, 400);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'private',
|
||||
followersVisibility: 'followers',
|
||||
}, alice);
|
||||
|
||||
const followersRes = await api('/users/followers', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followersRes.status, 400);
|
||||
}
|
||||
});
|
||||
|
||||
test('followingVisibility, followersVisibility がともに followers なユーザーのフォロー/フォロワーをフォロワーが見れる', async () => {
|
||||
await api('/i/update', {
|
||||
ffVisibility: 'followers',
|
||||
followingVisibility: 'followers',
|
||||
followersVisibility: 'followers',
|
||||
}, alice);
|
||||
|
||||
await api('/following/create', {
|
||||
|
@ -100,9 +332,106 @@ describe('FF visibility', () => {
|
|||
assert.strictEqual(Array.isArray(followersRes.body), true);
|
||||
});
|
||||
|
||||
test('ffVisibility が private なユーザーのフォロー/フォロワーを自分で見れる', async () => {
|
||||
test('followingVisibility が followers なユーザーのフォローを followersVisibility の設定に関わらずフォロワーが見れる', async () => {
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'followers',
|
||||
followersVisibility: 'public',
|
||||
}, alice);
|
||||
await api('/following/create', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followingRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followingRes.body), true);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'followers',
|
||||
followersVisibility: 'followers',
|
||||
}, alice);
|
||||
await api('/following/create', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followingRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followingRes.body), true);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'followers',
|
||||
followersVisibility: 'private',
|
||||
}, alice);
|
||||
await api('/following/create', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followingRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followingRes.body), true);
|
||||
}
|
||||
});
|
||||
|
||||
test('followersVisibility が followers なユーザーのフォロワーを followingVisibility の設定に関わらずフォロワーが見れる', async () => {
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'public',
|
||||
followersVisibility: 'followers',
|
||||
}, alice);
|
||||
await api('/following/create', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
|
||||
const followersRes = await api('/users/followers', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followersRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followersRes.body), true);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'followers',
|
||||
followersVisibility: 'followers',
|
||||
}, alice);
|
||||
await api('/following/create', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
|
||||
const followersRes = await api('/users/followers', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followersRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followersRes.body), true);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'private',
|
||||
followersVisibility: 'followers',
|
||||
}, alice);
|
||||
await api('/following/create', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
|
||||
const followersRes = await api('/users/followers', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followersRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followersRes.body), true);
|
||||
}
|
||||
});
|
||||
|
||||
test('followingVisibility, followersVisibility がともに private なユーザーのフォロー/フォロワーを自分で見れる', async () => {
|
||||
await api('/i/update', {
|
||||
ffVisibility: 'private',
|
||||
followingVisibility: 'private',
|
||||
followersVisibility: 'private',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
|
@ -118,9 +447,88 @@ describe('FF visibility', () => {
|
|||
assert.strictEqual(Array.isArray(followersRes.body), true);
|
||||
});
|
||||
|
||||
test('ffVisibility が private なユーザーのフォロー/フォロワーを他人が見れない', async () => {
|
||||
test('followingVisibility が private なユーザーのフォローを followersVisibility の設定に関わらず自分で見れる', async () => {
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'private',
|
||||
followersVisibility: 'public',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
userId: alice.id,
|
||||
}, alice);
|
||||
assert.strictEqual(followingRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followingRes.body), true);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'private',
|
||||
followersVisibility: 'followers',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
userId: alice.id,
|
||||
}, alice);
|
||||
assert.strictEqual(followingRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followingRes.body), true);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'private',
|
||||
followersVisibility: 'private',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
userId: alice.id,
|
||||
}, alice);
|
||||
assert.strictEqual(followingRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followingRes.body), true);
|
||||
}
|
||||
});
|
||||
|
||||
test('followersVisibility が private なユーザーのフォロワーを followingVisibility の設定に関わらず自分で見れる', async () => {
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'public',
|
||||
followersVisibility: 'private',
|
||||
}, alice);
|
||||
|
||||
const followersRes = await api('/users/followers', {
|
||||
userId: alice.id,
|
||||
}, alice);
|
||||
assert.strictEqual(followersRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followersRes.body), true);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'followers',
|
||||
followersVisibility: 'private',
|
||||
}, alice);
|
||||
|
||||
const followersRes = await api('/users/followers', {
|
||||
userId: alice.id,
|
||||
}, alice);
|
||||
assert.strictEqual(followersRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followersRes.body), true);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'private',
|
||||
followersVisibility: 'private',
|
||||
}, alice);
|
||||
|
||||
const followersRes = await api('/users/followers', {
|
||||
userId: alice.id,
|
||||
}, alice);
|
||||
assert.strictEqual(followersRes.status, 200);
|
||||
assert.strictEqual(Array.isArray(followersRes.body), true);
|
||||
}
|
||||
});
|
||||
|
||||
test('followingVisibility, followersVisibility がともに private なユーザーのフォロー/フォロワーを他人が見れない', async () => {
|
||||
await api('/i/update', {
|
||||
ffVisibility: 'private',
|
||||
followingVisibility: 'private',
|
||||
followersVisibility: 'private',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
|
@ -134,36 +542,129 @@ describe('FF visibility', () => {
|
|||
assert.strictEqual(followersRes.status, 400);
|
||||
});
|
||||
|
||||
test('followingVisibility が private なユーザーのフォローを followersVisibility の設定に関わらず他人が見れない', async () => {
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'private',
|
||||
followersVisibility: 'public',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followingRes.status, 400);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'private',
|
||||
followersVisibility: 'followers',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followingRes.status, 400);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'private',
|
||||
followersVisibility: 'private',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await api('/users/following', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followingRes.status, 400);
|
||||
}
|
||||
});
|
||||
|
||||
test('followersVisibility が private なユーザーのフォロワーを followingVisibility の設定に関わらず他人が見れない', async () => {
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'public',
|
||||
followersVisibility: 'private',
|
||||
}, alice);
|
||||
|
||||
const followersRes = await api('/users/followers', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followersRes.status, 400);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'followers',
|
||||
followersVisibility: 'private',
|
||||
}, alice);
|
||||
|
||||
const followersRes = await api('/users/followers', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followersRes.status, 400);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'private',
|
||||
followersVisibility: 'private',
|
||||
}, alice);
|
||||
|
||||
const followersRes = await api('/users/followers', {
|
||||
userId: alice.id,
|
||||
}, bob);
|
||||
assert.strictEqual(followersRes.status, 400);
|
||||
}
|
||||
});
|
||||
|
||||
describe('AP', () => {
|
||||
test('ffVisibility が public 以外ならばAPからは取得できない', async () => {
|
||||
test('followingVisibility が public 以外ならばAPからはフォローを取得できない', async () => {
|
||||
{
|
||||
await api('/i/update', {
|
||||
ffVisibility: 'public',
|
||||
followingVisibility: 'public',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await simpleGet(`/users/${alice.id}/following`, 'application/activity+json');
|
||||
const followersRes = await simpleGet(`/users/${alice.id}/followers`, 'application/activity+json');
|
||||
assert.strictEqual(followingRes.status, 200);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'followers',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await simpleGet(`/users/${alice.id}/following`, 'application/activity+json');
|
||||
assert.strictEqual(followingRes.status, 403);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
followingVisibility: 'private',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await simpleGet(`/users/${alice.id}/following`, 'application/activity+json');
|
||||
assert.strictEqual(followingRes.status, 403);
|
||||
}
|
||||
});
|
||||
|
||||
test('followersVisibility が public 以外ならばAPからはフォロワーを取得できない', async () => {
|
||||
{
|
||||
await api('/i/update', {
|
||||
followersVisibility: 'public',
|
||||
}, alice);
|
||||
|
||||
const followersRes = await simpleGet(`/users/${alice.id}/followers`, 'application/activity+json');
|
||||
assert.strictEqual(followersRes.status, 200);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
ffVisibility: 'followers',
|
||||
followersVisibility: 'followers',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await simpleGet(`/users/${alice.id}/following`, 'application/activity+json');
|
||||
const followersRes = await simpleGet(`/users/${alice.id}/followers`, 'application/activity+json');
|
||||
assert.strictEqual(followingRes.status, 403);
|
||||
assert.strictEqual(followersRes.status, 403);
|
||||
}
|
||||
{
|
||||
await api('/i/update', {
|
||||
ffVisibility: 'private',
|
||||
followersVisibility: 'private',
|
||||
}, alice);
|
||||
|
||||
const followingRes = await simpleGet(`/users/${alice.id}/following`, 'application/activity+json');
|
||||
const followersRes = await simpleGet(`/users/${alice.id}/followers`, 'application/activity+json');
|
||||
assert.strictEqual(followingRes.status, 403);
|
||||
assert.strictEqual(followersRes.status, 403);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -112,7 +112,8 @@ describe('ユーザー', () => {
|
|||
pinnedPageId: user.pinnedPageId,
|
||||
pinnedPage: user.pinnedPage,
|
||||
publicReactions: user.publicReactions,
|
||||
ffVisibility: user.ffVisibility,
|
||||
followingVisibility: user.followingVisibility,
|
||||
followersVisibility: user.followersVisibility,
|
||||
twoFactorEnabled: user.twoFactorEnabled,
|
||||
usePasswordLessLogin: user.usePasswordLessLogin,
|
||||
securityKeys: user.securityKeys,
|
||||
|
@ -386,7 +387,8 @@ describe('ユーザー', () => {
|
|||
assert.strictEqual(response.pinnedPageId, null);
|
||||
assert.strictEqual(response.pinnedPage, null);
|
||||
assert.strictEqual(response.publicReactions, true);
|
||||
assert.strictEqual(response.ffVisibility, 'public');
|
||||
assert.strictEqual(response.followingVisibility, 'public');
|
||||
assert.strictEqual(response.followersVisibility, 'public');
|
||||
assert.strictEqual(response.twoFactorEnabled, false);
|
||||
assert.strictEqual(response.usePasswordLessLogin, false);
|
||||
assert.strictEqual(response.securityKeys, false);
|
||||
|
@ -495,9 +497,12 @@ describe('ユーザー', () => {
|
|||
{ parameters: (): object => ({ alwaysMarkNsfw: false }) },
|
||||
{ parameters: (): object => ({ autoSensitive: true }) },
|
||||
{ parameters: (): object => ({ autoSensitive: false }) },
|
||||
{ parameters: (): object => ({ ffVisibility: 'private' }) },
|
||||
{ parameters: (): object => ({ ffVisibility: 'followers' }) },
|
||||
{ parameters: (): object => ({ ffVisibility: 'public' }) },
|
||||
{ parameters: (): object => ({ followingVisibility: 'private' }) },
|
||||
{ parameters: (): object => ({ followingVisibility: 'followers' }) },
|
||||
{ parameters: (): object => ({ followingVisibility: 'public' }) },
|
||||
{ parameters: (): object => ({ followersVisibility: 'private' }) },
|
||||
{ parameters: (): object => ({ followersVisibility: 'followers' }) },
|
||||
{ parameters: (): object => ({ followersVisibility: 'public' }) },
|
||||
{ parameters: (): object => ({ mutedWords: Array(19).fill(['xxxxx']) }) },
|
||||
{ parameters: (): object => ({ mutedWords: [['x'.repeat(194)]] }) },
|
||||
{ parameters: (): object => ({ mutedWords: [] }) },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue