Fix boostability for private-visibility posts

This commit is contained in:
Lim Chee Aun 2023-03-10 15:49:23 +08:00
parent bb6e0ac383
commit f15b859971

View file

@ -246,8 +246,15 @@ function Status({
const editedDateText = editedAt && niceDateTime(editedAtDate); const editedDateText = editedAt && niceDateTime(editedAtDate);
const isSizeLarge = size === 'l'; const isSizeLarge = size === 'l';
// TODO: if visibility = private, only can boost own statuses // Can boost if:
const canBoost = authenticated && visibility !== 'direct'; // - authenticated AND
// - visibility != direct OR
// - visibility = private AND isSelf
let canBoost =
authenticated && visibility !== 'direct' && visibility !== 'private';
if (visibility === 'private' && isSelf) {
canBoost = true;
}
const replyStatus = () => { const replyStatus = () => {
if (!sameInstance || !authenticated) { if (!sameInstance || !authenticated) {