mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 22:17:30 -07:00
非公開の投稿に自分以外が返信したりRenoteしたりできないように
This commit is contained in:
parent
b62b422fdd
commit
5df1de8b1a
1 changed files with 10 additions and 0 deletions
|
@ -111,6 +111,16 @@ export default async (user: IUser, data: Option, silent = false) => new Promise<
|
|||
return rej();
|
||||
}
|
||||
|
||||
// リプライ先が自分以外の非公開の投稿なら禁止
|
||||
if (data.reply && data.reply.visibility == 'private' && !data.reply.userId.equals(user._id)) {
|
||||
return rej();
|
||||
}
|
||||
|
||||
// Renote先が自分以外の非公開の投稿なら禁止
|
||||
if (data.renote && data.renote.visibility == 'private' && !data.renote.userId.equals(user._id)) {
|
||||
return rej();
|
||||
}
|
||||
|
||||
if (data.text) {
|
||||
data.text = data.text.trim();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue