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:
		| @@ -176,7 +176,8 @@ export const paramDef = { | ||||
| 		receiveAnnouncementEmail: { type: 'boolean' }, | ||||
| 		alwaysMarkNsfw: { type: 'boolean' }, | ||||
| 		autoSensitive: { type: 'boolean' }, | ||||
| 		ffVisibility: { type: 'string', enum: ['public', 'followers', 'private'] }, | ||||
| 		followingVisibility: { type: 'string', enum: ['public', 'followers', 'private'] }, | ||||
| 		followersVisibility: { type: 'string', enum: ['public', 'followers', 'private'] }, | ||||
| 		pinnedPageId: { type: 'string', format: 'misskey:id', nullable: true }, | ||||
| 		mutedWords: muteWords, | ||||
| 		hardMutedWords: muteWords, | ||||
| @@ -241,7 +242,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint- | ||||
| 			if (ps.lang !== undefined) profileUpdates.lang = ps.lang; | ||||
| 			if (ps.location !== undefined) profileUpdates.location = ps.location; | ||||
| 			if (ps.birthday !== undefined) profileUpdates.birthday = ps.birthday; | ||||
| 			if (ps.ffVisibility !== undefined) profileUpdates.ffVisibility = ps.ffVisibility; | ||||
| 			if (ps.followingVisibility !== undefined) profileUpdates.followingVisibility = ps.followingVisibility; | ||||
| 			if (ps.followersVisibility !== undefined) profileUpdates.followersVisibility = ps.followersVisibility; | ||||
|  | ||||
| 			function checkMuteWordCount(mutedWords: (string[] | string)[], limit: number) { | ||||
| 				// TODO: ちゃんと数える | ||||
|   | ||||
| @@ -93,11 +93,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint- | ||||
|  | ||||
| 			const profile = await this.userProfilesRepository.findOneByOrFail({ userId: user.id }); | ||||
|  | ||||
| 			if (profile.ffVisibility === 'private') { | ||||
| 			if (profile.followersVisibility === 'private') { | ||||
| 				if (me == null || (me.id !== user.id)) { | ||||
| 					throw new ApiError(meta.errors.forbidden); | ||||
| 				} | ||||
| 			} else if (profile.ffVisibility === 'followers') { | ||||
| 			} else if (profile.followersVisibility === 'followers') { | ||||
| 				if (me == null) { | ||||
| 					throw new ApiError(meta.errors.forbidden); | ||||
| 				} else if (me.id !== user.id) { | ||||
|   | ||||
| @@ -101,11 +101,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint- | ||||
|  | ||||
| 			const profile = await this.userProfilesRepository.findOneByOrFail({ userId: user.id }); | ||||
|  | ||||
| 			if (profile.ffVisibility === 'private') { | ||||
| 			if (profile.followingVisibility === 'private') { | ||||
| 				if (me == null || (me.id !== user.id)) { | ||||
| 					throw new ApiError(meta.errors.forbidden); | ||||
| 				} | ||||
| 			} else if (profile.ffVisibility === 'followers') { | ||||
| 			} else if (profile.followingVisibility === 'followers') { | ||||
| 				if (me == null) { | ||||
| 					throw new ApiError(meta.errors.forbidden); | ||||
| 				} else if (me.id !== user.id) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 zawa-ch
					zawa-ch