mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-23 17:16:26 +01:00
Fix boostability for private-visibility posts
This commit is contained in:
parent
bb6e0ac383
commit
f15b859971
1 changed files with 9 additions and 2 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue