summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/endpoints/following/update.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-10-03 20:26:11 +0900
committerMar0xy <marie@kaifa.ch>2023-10-13 17:58:11 +0200
commitf6ba5cfaf4b147d7b9dc6349fea250f1fdf1088d (patch)
treed3c10281ce2bfee3f79162f658565c28c64c1bbf /packages/backend/src/server/api/endpoints/following/update.ts
parentupd: delete reactions properly in the DB (diff)
downloadsharkey-f6ba5cfaf4b147d7b9dc6349fea250f1fdf1088d.tar.gz
sharkey-f6ba5cfaf4b147d7b9dc6349fea250f1fdf1088d.tar.bz2
sharkey-f6ba5cfaf4b147d7b9dc6349fea250f1fdf1088d.zip
merge: timeline 1
Diffstat (limited to 'packages/backend/src/server/api/endpoints/following/update.ts')
-rw-r--r--packages/backend/src/server/api/endpoints/following/update.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/backend/src/server/api/endpoints/following/update.ts b/packages/backend/src/server/api/endpoints/following/update.ts
index 25f393e517..db17d151df 100644
--- a/packages/backend/src/server/api/endpoints/following/update.ts
+++ b/packages/backend/src/server/api/endpoints/following/update.ts
@@ -57,8 +57,9 @@ export const paramDef = {
properties: {
userId: { type: 'string', format: 'misskey:id' },
notify: { type: 'string', enum: ['normal', 'none'] },
+ withReplies: { type: 'boolean' },
},
- required: ['userId', 'notify'],
+ required: ['userId'],
} as const;
@Injectable()
@@ -98,7 +99,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
await this.followingsRepository.update({
id: exist.id,
}, {
- notify: ps.notify === 'none' ? null : ps.notify,
+ notify: ps.notify != null ? (ps.notify === 'none' ? null : ps.notify) : undefined,
+ withReplies: ps.withReplies != null ? ps.withReplies : undefined,
});
return await this.userEntityService.pack(follower.id, me);