mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-23 18:43:08 +02:00
非公開の投稿に自分以外が返信したりRenoteしたりできないように
This commit is contained in:
parent
84a4174883
commit
10f9549a04
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